Build fails with CFLAGS="-O0": implicit declaration of function ‘setlocale’
$ make -e CFLAGS="-O0"
CC rb-metadata-dbus-service.o
rb-metadata-dbus-service.c: In function ‘main’:
rb-metadata-dbus-service.c:360:2: error: implicit declaration of function ‘setlocale’ [-Werror=implicit-function-declaration]
360 | setlocale (LC_ALL, "");
| ^~~~~~~~~
rb-metadata-dbus-service.c:360:2: error: nested extern declaration of ‘setlocale’ [-Werror=nested-externs]
rb-metadata-dbus-service.c:360:13: error: ‘LC_ALL’ undeclared (first use in this function)
360 | setlocale (LC_ALL, "");
| ^~~~~~
rb-metadata-dbus-service.c:360:13: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
make[1]: *** [Makefile:727: rb-metadata-dbus-service.o] Error 1
Passes with >= -O1
flags:
$ make -e CFLAGS="-O1"
CC rb-metadata-dbus-service.o
CCLD rhythmbox-metadata
Edited by Andre Klapper