Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Misra rule 45
#1
Hi,

i compiled the following code using a misra checking compiler

unsigned char data[1];
memset(&data,0x00,sizeof(data));

after compilation it was showing two errors violating rule 45 and rule 77


i changed the line as given below.
memset((void*)&data,0x00,sizeof(data));

it removed the error violating 77.

But i couldnot find any way to comply with rule 45

Can any one have any idea to perform the above actions without
violating the rule


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)