On Thu, Jun 27, 2019 at 3:43 PM Stanislav Fomichev <sdf@xxxxxxxxxxx> wrote: > > > There is a build warning though: > > test_sockopt_sk.c: In function ‘getsetsockopt’: > > test_sockopt_sk.c:115:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > > if (*(__u32 *)buf != 0x55AA*2) { > > ^~ > > test_sockopt_sk.c:116:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > > log_err("Unexpected getsockopt(SO_SNDBUF) 0x%x != 0x55AA*2", > > ^~~~~~~ > > > > Pls fix it in the follow up. > Sure, but I can't reproduce it with gcc7 nor with clang9 :-/ I see it with gcc 6.3