05-01-2006, 09:57 AM
Answer: MISRA C Steering Team 5/1/06
unsigned char data[1];
memset(&data,0x00,sizeof(data));
The example above is not in violation of either Rule 45 or 77.
void * is compatible with any other pointer, and therefore no cast is required.
See 6.2.2.3 in ISO C 9899:1990.
Rule 45 can only be violated by a cast.
unsigned char data[1];
memset(&data,0x00,sizeof(data));
The example above is not in violation of either Rule 45 or 77.
void * is compatible with any other pointer, and therefore no cast is required.
See 6.2.2.3 in ISO C 9899:1990.
Rule 45 can only be violated by a cast.