Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 11.9: Does this struct initialization violate rule 11.9?
#2
Code:
typedef struct {
uint16 myVariable01;
uint8 myArray [16];
uint8 myVariable02;
} myType;
Since myType does not contain a pointer and NULL macro is not even used in initialization, it is a false positive IMHO.
A violation would look like this:
Code:
uint8* ptr = 0;// use NULL for pointer initialization
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)