warning: dereferencing type-punned pointer will break strict-aliasing rules
Development toolkit for Web Services and XML data bindings for C & C++
Brought to you by:
engelen
Compiling gsoap results in warnings about broken strict aliasing rules.
stdsoap2_ssl.c: In function 'soap_rand':
stdsoap2_ssl.c:3112:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return *(int*)buf;
^
stdsoap2_ssl_cpp.cpp: In function 'int soap_rand()':
stdsoap2_ssl_cpp.cpp:3112:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return *(int*)buf;
^
../../plugin/wsaapi.c: In function 'soap_wsa_rand_uuid':
../../plugin/wsaapi.c:602:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
r2 += *(int*)soap->buf;
^
Patch attached.
Updated patch - missing parentheses.