Quantcast
Channel: warning: taking address of packed member of 'struct details' may result in an unaligned pointer value [-Waddress-of-packed-member] - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by oromoiluig for warning: taking address of packed member of 'struct...

In the comments to your post you have the explanation of the why it warns and why it can be a bad idea to take a pointer of a non-aligned member. The issue is not so much about assigning an unaligned...

View Article



warning: taking address of packed member of 'struct details' may result in an...

struct details_state { struct details_status D1; struct details_status D2; }; struct details { struct details_state details_states[2]; } __attribute__((packed)); struct details *p; void...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images