1 --- openhpi-0.9.0/marshal/marshal.c~ Wed Jun 16 19:50:24 2004
2 +++ openhpi-0.9.0/marshal/marshal.c Wed Jun 16 19:54:27 2004
15 - tUint16 v = *(const tUint16 *)data;
16 - *(tUint16 *)buffer = v;
17 + memcpy(buffer, data, sizeof(tUint16));
20 return sizeof( tUint16 );
25 - tUint32 v = *(const tUint32 *)data;
26 - *(tUint32 *)buffer = v;
27 + memcpy(buffer, data, sizeof(tUint32));
30 return sizeof( tUint32 );
35 - tUint64 v = *(const tUint64 *)data;
36 - *(tUint64 *)buffer = v;
37 + memcpy(buffer, data, sizeof(tUint64));
40 return sizeof( tUint64 );
44 - tFloat32 v = *(const tFloat32 *)data;
45 - *(tFloat32 *)buffer = v;
46 + memcpy(buffer, data, sizeof(tFloat32));
49 return sizeof( tFloat32 );
53 - tFloat64 v = *(const tFloat64 *)data;
54 - *(tFloat64 *)buffer = v;
55 + memcpy(buffer, data, sizeof(tFloat64));
58 return sizeof( tFloat64 );
63 - m = (tUint32)*(const tUint16 *)so;
66 + memcpy(&buf, so, sizeof(tUint16));
73 - m = *(const tUint32 *)so;
74 + memcpy(&m, so, sizeof(tUint32));
82 - size = (tUint32)*(const tUint16 *)so;
85 + memcpy(&buf, so, sizeof(tUint16));
86 + size = (tUint32)buf;
92 - size = *(const tUint32 *)so;
93 + memcpy(&size, so, sizeof(tUint32));
101 - tUint16 v = *(const tUint16 *)buffer;
103 + memcpy(&v, buffer, sizeof(tUint16));
105 if ( MarshalByteOrder() != byte_order )
108 - *(tUint16 *)data = v;
109 + memcpy(data, &v, sizeof(tUint16));
112 return sizeof( tUint16 );
113 @@ -596,12 +601,13 @@
117 - tUint32 v = *(const tUint32 *)buffer;
119 + memcpy(&v, buffer, sizeof(tUint32));
121 if ( MarshalByteOrder() != byte_order )
124 - *(tUint32 *)data = v;
125 + memcpy(data, &v, sizeof(tUint32));
128 return sizeof( tUint32 );
129 @@ -609,12 +615,13 @@
133 - tUint64 v = *(const tUint64 *)buffer;
135 + memcpy(&v, buffer, sizeof(tUint64));
137 if ( MarshalByteOrder() != byte_order )
140 - *(tUint64 *)data = v;
141 + memcpy(data, &v, sizeof(tUint64));
144 return sizeof( tUint64 );
145 @@ -622,13 +629,16 @@
148 // this has been tested for i386 and PPC
151 - v.m_f32 = *(const tFloat32 *)buffer;
152 + memcpy(&v2, buffer, sizeof(tFloat32));
155 if ( MarshalByteOrder() != byte_order )
156 v.m_u32 = bswap_32( v.m_u32 );
158 - *(tFloat32 *)data = v.m_f32;
160 + memcpy(data, &v2, sizeof(tFloat32));
163 return sizeof( tFloat32 );
164 @@ -636,13 +646,16 @@
167 // this has been tested for i386 and PPC
170 - v.m_f64 = *(const tFloat64 *)buffer;
171 + memcpy(&v2, buffer, sizeof(tFloat64));
174 if ( MarshalByteOrder() != byte_order )
175 v.m_u64 = bswap_64( v.m_u64 );
177 - *(tFloat64 *)data = v.m_f64;
179 + memcpy(data, &v2, sizeof(tFloat64));
182 return sizeof( tFloat64 );
183 --- openhpi-1.0.0/plugins/ipmi/ipmi_controls.c.orig 2004-06-14 06:38:42.000000000 +0000
184 +++ openhpi-1.0.0/plugins/ipmi/ipmi_controls.c 2004-07-03 15:13:28.000000000 +0000
188 ipmi_control_set_val(control,
189 - (int *)&info->state->StateUnion.Oem.Body[0],
190 + (int *)(void*)&info->state->StateUnion.Oem.Body[0],
191 __set_control_state, info);