user/glib: wrong NULL type: FAILED: glib/tests/cxx.p/cxx.cpp.o
After bumping 2.62.6
to 2.71.0
one of the tests fails to build because of an incompatible NULL
type.
[253/1247] Compiling C++ object glib/tests/cxx.p/cxx.cpp.o
FAILED: glib/tests/cxx.p/cxx.cpp.o
ccache c++ -Iglib/tests/cxx.p -Iglib/tests -I../glib/tests -I. -I.. -Iglib -I../glib -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -O2 -g -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -W
unused -Wno-unused-parameter -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror=pointer-arith -O2 -ggdb -march=nocona -mtune=core2 -fno-omit-frame-pointer -mfpmath=sse
-g -Os -fomit-frame-pointer -pthread -MD -MQ glib/tests/cxx.p/cxx.cpp.o -MF glib/tests/cxx.p/cxx.cpp.o.d -o glib/tests/cxx.p/cxx.cpp.o -c ../glib/tests/cxx.cpp
../glib/tests/cxx.cpp: In function ‘int main(int, char**)’:
../glib/tests/cxx.cpp:59:34: error: missing sentinel in function call [-Werror=format=]
g_test_init (&argc, &argv, NULL);
^
A quick and dirty patch is to cast (char *)NULL
. Otherwise -Werror
could be fully or partially disabled, but we probably don't want to affect other parts of the build.