I have a third-party piece of code to compile, below is the snippet that fails:
typedef struct wqe_s {
...
uint8_t packet_data[96]
...
} wqe_t;
..
wqe_t *work = NULL;
..
wqe_t *w1 = *(wqe_t **)work->packet_data; // ERROR
error: dereferencing type-punned pointer will break strict-aliasing rules
It is compiled with gcc-4.7 (-Wall -Werror), I don't think I need to adjust compiler flags, the best would be to fix the code.
I would appreciate to get some advice for this. Thanks!