Closed guanhj-ips closed 3 years ago
Hi, when I compile the master and v0.62, they all report errors. I delete -Werror option, they all report ln error. please fix them.
/usr/bin/gcc -std=gnu11 -O3 -Wall -Werror -Wno-error=pointer-sign -fPIC -DZLIB_API -I../inc_nx -c -o nx_zlib.o nx_zlib.c nx_zlib.c: In function ‘nx_enumerate_engines’: nx_zlib.c:642:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] nx_devices[count].nx_id = be32toh((int )buf); ^ nx_zlib.c:660:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] nx_devices[count].socket_id = be32toh((int )buf);
Reproduced with GCC 4.8.5.
Fixed with commit 828e9ee6354de3886f5bc33348469a914261dfd6.
Hi, when I compile the master and v0.62, they all report errors. I delete -Werror option, they all report ln error. please fix them.
/usr/bin/gcc -std=gnu11 -O3 -Wall -Werror -Wno-error=pointer-sign -fPIC -DZLIB_API -I../inc_nx -c -o nx_zlib.o nx_zlib.c nx_zlib.c: In function ‘nx_enumerate_engines’: nx_zlib.c:642:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] nx_devices[count].nx_id = be32toh((int )buf); ^ nx_zlib.c:660:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] nx_devices[count].socket_id = be32toh((int )buf);