You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As advised by #325 (comment), I'm sharing compiler warnings, which are given by gcc for the GLEW 2.2.0 release, when compiling from source statically with GLEW_STATIC defined.
Here is the the relevant section from my Makefile's output
-- compiling src/glew.c --
cc -c src/glew.c -o obj/glew.o -I inc -pipe -static -Ofast -s -flto=8 -Wall -DGLEW_STATIC
src/glew.c: In function '_glewStrSame1':
src/glew.c:256:29: warning: the comparison will always evaluate as 'true' for the pointer operand in '*a + (sizetype)i' must not be NULL [-Waddress]
256 | while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
| ^~
src/glew.c:256:44: warning: the comparison will always evaluate as 'true' for the pointer operand in 'b + (sizetype)i' must not be NULL [-Waddress]
256 | while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
| ^~
src/glew.c: In function '_glewStrSame2':
src/glew.c:272:29: warning: the comparison will always evaluate as 'true' for the pointer operand in '*a + (sizetype)i' must not be NULL [-Waddress]
272 | while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
| ^~
src/glew.c:272:44: warning: the comparison will always evaluate as 'true' for the pointer operand in 'b + (sizetype)i' must not be NULL [-Waddress]
272 | while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
| ^~
src/glew.c: In function '_glewStrSame3':
src/glew.c:288:29: warning: the comparison will always evaluate as 'true' for the pointer operand in '*a + (sizetype)i' must not be NULL [-Waddress]
288 | while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
| ^~
src/glew.c:288:44: warning: the comparison will always evaluate as 'true' for the pointer operand in 'b + (sizetype)i' must not be NULL [-Waddress]
288 | while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
| ^~
The text was updated successfully, but these errors were encountered:
I can confirm these warnings for the 2.2.0 release in Ubuntu 22.04 (Jammy) using gcc-12 toolchain.
gcc-10 and gcc-11 both compile without complaint.
For current master branch, gcc-12 also builds without complaint.
So this issue will be resolved in the next release, without any further action needed.
As advised by #325 (comment), I'm sharing compiler warnings, which are given by gcc for the GLEW 2.2.0 release, when compiling from source statically with GLEW_STATIC defined.
Here is the the relevant section from my Makefile's output
The text was updated successfully, but these errors were encountered: