Closed CodeOhms closed 5 years ago
I do not see these warnings with gcc 7.4 on Ubuntu 18.04 and with gcc 9 on Msys2. On which operating system are you seeing these warnings? Could you please post the full make output?
Here is the info about my set up: GCC
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 9.1.0 (GCC)
System specs Arch: x86_64 Kernel: 5.2.11-1-MANJARO
Build output for matlo/GIMX in gimxfile branch
make -C shared
make[1]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared'
make -C gimxlog UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxlog'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxlog -Iinclude -I../ -c -o src/glog.o src/glog.c
cc -Iinclude -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxlog -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxlog -shared src/glog.o -o libgimxlog.so
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxlog'
make -C gimxuhid UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxuhid'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxuhid -Iinclude -I. -I../ -c -o src/linux/uhidasync.o src/linux/uhidasync.c
cc -Iinclude -I. -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxuhid -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxuhid -shared src/linux/uhidasync.o -o libgimxuhid.so -L../gimxlog -lgimxlog
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxuhid'
make -C gimxfile UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxfile'
g++ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxfile -Iinclude -I../ -c -o src/gfile.o src/gfile.cpp
cc -Iinclude -I../ -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxfile -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxfile -shared src/gfile.o -o libgimxfile.so -L../gimxlog -lgimxlog
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxfile'
make -C gimxtime UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxtime'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxtime -Iinclude -I. -I../ -c -o src/posix/gtime.o src/posix/gtime.c
cc -Iinclude -I. -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxtime -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxtime -shared src/posix/gtime.o -o libgimxtime.so -L../gimxlog -lgimxlog
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxtime'
make -C gimxcontroller UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxcontroller'
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/g29_ps4.o src/g29_ps4.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/df_ps2.o src/df_ps2.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/gtf_ps2.o src/gtf_ps2.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/g27_ps3.o src/g27_ps3.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/dfp_ps2.o src/dfp_ps2.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/ds2.o src/ds2.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/t300rs_ps4.o src/t300rs_ps4.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/xbox.o src/xbox.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/xone.o src/xone.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/ds4.o src/ds4.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/controller.o src/controller.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/joystick.o src/joystick.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/ds3.o src/ds3.c
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/x360.o src/x360.c
cc -I../ -fPIC -Iinclude -Wall -Wextra -Werror -O3 -Wall -Wextra -Werror -O3 -shared src/g29_ps4.o src/df_ps2.o src/gtf_ps2.o src/g27_ps3.o src/dfp_ps2.o src/ds2.o src/t300rs_ps4.o src/xbox.o src/xone.o src/ds4.o src/controller.o src/joystick.o src/ds3.o src/x360.o -o libgimxcontroller.so
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxcontroller'
make -C gimxdownloader UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxdownloader'
g++ -fPIC -Wall -Wextra -Werror -O3 -I../ -c -o Downloader.o Downloader.cpp
cc -I../ -Wall -Wextra -Werror -O3 -fPIC -Wall -Wextra -Werror -O3 -shared Downloader.o -o libgimxdownloader.so -L../gimxfile -lstdc++ `curl-config --libs` -lgimxfile
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxdownloader'
make -C gimxupdater UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxupdater'
g++ -fPIC -Wall -Wextra -Werror -O3 -I../ -I../ -c -o Updater.o Updater.cpp
cc -I../ -I../ -Wall -Wextra -Werror -O3 -fPIC -Wall -Wextra -Werror -O3 -shared Updater.o -o libgimxupdater.so -lstdc++ -L../gimxfile -L../gimxdownloader -lgimxfile -lgimxdownloader
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxupdater'
make -C gimxconfigupdater UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxconfigupdater'
g++ -fPIC -Wall -Wextra -Werror -O3 -I../ -I../ -c -o configupdater.o configupdater.cpp
cc -I../ -I../ -Wall -Wextra -Werror -O3 -fPIC -Wall -Wextra -Werror -O3 -shared configupdater.o -o libgimxconfigupdater.so -lstdc++ -L../gimxfile -L../gimxdownloader -lgimxfile -lgimxdownloader
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxconfigupdater'
make -C gimxhid UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxhid'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxhid -Iinclude -I. -I../ -c -o src/libusb/ghid.o src/libusb/ghid.c
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxhid -Iinclude -I. -I../ -c -o src/libusb/gusbhid.o src/libusb/gusbhid.c
cc -Iinclude -I. -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxhid -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxhid -shared src/libusb/ghid.o src/libusb/gusbhid.o -o libgimxhid.so -L../gimxlog -lgimxlog -lusb-1.0
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxhid'
make -C gimxpoll UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxpoll'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxpoll -Iinclude -I../ -c -o src/posix/gpoll.o src/posix/gpoll.c
cc -Iinclude -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxpoll -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxpoll -shared src/posix/gpoll.o -o libgimxpoll.so -L../gimxlog -lgimxlog
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxpoll'
make -C gimxinput UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxinput'
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/queue.o src/queue.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/conversion.o src/conversion.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/ginput.o src/ginput.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/hid/steamcontroller.o src/hid/steamcontroller.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/hid/logitechwheel.o src/hid/logitechwheel.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/hid/hidinput.o src/hid/hidinput.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/linux/mkb.o src/linux/mkb.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/linux/events.o src/linux/events.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/linux/js.o src/linux/js.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/linux/keycodes.o src/linux/keycodes.c
cc -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Iinclude -I. -I../ -c -o src/linux/xinput.o src/linux/xinput.c
cc -Iinclude -I. -I../ -fPIC -DUHID -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxinput -shared src/queue.o src/conversion.o src/ginput.o src/hid/steamcontroller.o src/hid/logitechwheel.o src/hid/hidinput.o src/linux/mkb.o src/linux/events.o src/linux/js.o src/linux/keycodes.o src/linux/xinput.o -o libgimxinput.so -L../gimxlog -L../gimxhid -L../gimxuhid -lgimxlog -lgimxhid -lgimxuhid -lXi -lX11
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxinput'
make -C gimxprio UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxprio'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxprio -Iinclude -I../ -c -o src/linux/gprio.o src/linux/gprio.c
cc -Iinclude -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxprio -Wall -Wextra -Werror -O3 -shared src/linux/gprio.o -o libgimxprio.so -L../gimxlog -lgimxlog
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxprio'
make -C gimxserial UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxserial'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxserial -Iinclude -I. -I../ -c -o async.o ../gimxcommon/src/posix/async.c
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxserial -Iinclude -I. -I../ -c -o src/posix/gserial.o src/posix/gserial.c
cc -Iinclude -I. -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxserial -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxserial -shared async.o src/posix/gserial.o -o libgimxserial.so -L../gimxlog -lgimxlog
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxserial'
make -C gimxtimer UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxtimer'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxtimer -Iinclude -I. -I../ -c -o src/linux/gtimer.o src/linux/gtimer.c
cc -Iinclude -I. -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxtimer -Wall -Wextra -Werror -O3 -shared src/linux/gtimer.o -o libgimxtimer.so -L../gimxlog -L../gimxtime -lgimxlog -lgimxtime
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxtimer'
make -C gimxusb UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxusb'
cc -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxusb -Iinclude -I. -I../ -c -o src/gusb.o src/gusb.c
cc -Iinclude -I. -I../ -fPIC -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxusb -Wall -Wextra -Werror -O3 -DGLOG_NAME=gimxusb -shared src/gusb.o -o libgimxusb.so -L../gimxlog -lusb-1.0 -lgimxlog
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxusb'
make -C gimxgpp UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxgpp'
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o pcprog.o pcprog.c
cc -I../ -fPIC -Iinclude -Wall -Wextra -Werror -O3 -Wall -Wextra -Werror -O3 -shared pcprog.o -o libgimxgpp.so -L../gimxlog -L../gimxhid -L../gimxfile -lgimxlog -lgimxhid -lgimxfile
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxgpp'
make -C gimxconfigeditor UHID=1
make[2]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxconfigeditor'
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/EventCatcher.o src/EventCatcher.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/Controller.o src/Controller.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/XmlWritter.o src/XmlWritter.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/ControlMapper.o src/ControlMapper.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/ConfigurationFile.o src/ConfigurationFile.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/MouseOptions.o src/MouseOptions.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/JoystickCorrections.o src/JoystickCorrections.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/Trigger.o src/Trigger.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/Intensity.o src/Intensity.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/Profile.o src/Profile.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/ForceFeedback.o src/ForceFeedback.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/Device.o src/Device.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/Event.o src/Event.cpp
g++ -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -I../ -c -o src/XmlReader.o src/XmlReader.cpp
cc -I../ -Wall -Wextra -Werror -O3 -fPIC `xml2-config --cflags` -Iinclude -Wall -Wextra -Werror -O3 -shared src/EventCatcher.o src/Controller.o src/XmlWritter.o src/ControlMapper.o src/ConfigurationFile.o src/MouseOptions.o src/JoystickCorrections.o src/Trigger.o src/Intensity.o src/Profile.o src/ForceFeedback.o src/Device.o src/Event.o src/XmlReader.o -o libgimxconfigeditor.so -lstdc++ -L../gimxhid -L../gimxinput -L../gimxtimer -L../gimxpoll -L../gimxcontroller -L../gimxuhid `xml2-config --libs` -lgimxhid -lgimxinput -lgimxtimer -lgimxpoll -lgimxcontroller -lgimxuhid
make[2]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared/gimxconfigeditor'
make[1]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/shared'
make -C utils
make[1]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/utils'
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared -c -o ds4tool.o ds4tool.c
cc -L../shared/gimxlog -L../shared/gimxpoll -L../shared/gimxlog -L../shared/gimxusb ds4tool.o -lgimxlog -lgimxpoll -lgimxlog -lgimxusb -o ds4tool
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared -c -o sixaddr.o sixaddr.c
cc -L../shared/gimxlog -L../shared/gimxpoll -L../shared/gimxlog -L../shared/gimxusb sixaddr.o -lgimxlog -lgimxpoll -lgimxlog -lgimxusb -o sixaddr
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared -c -o linux/bdaddr.o linux/bdaddr.c
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared -c -o linux/oui.o linux/oui.c
cc -L../shared/gimxlog -L../shared/gimxpoll -L../shared/gimxlog -L../shared/gimxusb linux/bdaddr.o linux/oui.o -lgimxlog -lgimxpoll -lgimxlog -lgimxusb -lbluetooth -o bdaddr
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared -c -o linux/hcirevision.o linux/hcirevision.c
cc -L../shared/gimxlog -L../shared/gimxpoll -L../shared/gimxlog -L../shared/gimxusb linux/hcirevision.o -lgimxlog -lgimxpoll -lgimxlog -lgimxusb -lbluetooth -o hcirevision
make[1]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/utils'
make -C core
make[1]: Entering directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/core'
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared `xml2-config --cflags` -I. -Iconnectors/bluetooth/btstack/include -Iconnectors/bluetooth/btstack/src -c -o gimx.o gimx.c
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared `xml2-config --cflags` -I. -Iconnectors/bluetooth/btstack/include -Iconnectors/bluetooth/btstack/src -c -o config_reader.o config_reader.c
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared `xml2-config --cflags` -I. -Iconnectors/bluetooth/btstack/include -Iconnectors/bluetooth/btstack/src -c -o log.o log.c
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared `xml2-config --cflags` -I. -Iconnectors/bluetooth/btstack/include -Iconnectors/bluetooth/btstack/src -c -o config.o config.c
cc -Wall -Wextra -Werror -O3 -DUHID -I../shared `xml2-config --cflags` -I. -Iconnectors/bluetooth/btstack/include -Iconnectors/bluetooth/btstack/src -c -o macros.o macros.c
macros.c: In function ‘read_macros’:
macros.c:987:45: error: ‘%s’ directive output may be truncated writing 11 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
987 | snprintf(file_path, sizeof(file_path), "%s%s", dir_path, MACRO_CONFIGS_FILE);
| ^~
macros.c:987:3: note: ‘snprintf’ output between 12 and 4107 bytes into a destination of size 4096
987 | snprintf(file_path, sizeof(file_path), "%s%s", dir_path, MACRO_CONFIGS_FILE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [<builtin>: macros.o] Error 1
make[1]: Leaving directory '/home/codeohms/Documents/programming/c_c++/gimx/gimx-gimxfile-upstream/core'
make: *** [Makefile:15: build-core] Error 2
I have the same system setup on my laptop, and same architecture. The exact same error occurs, with exactly the same values for the byte sizes:
macros.c:987:45: error: ‘%s’ directive output may be truncated writing 11 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
987 | snprintf(file_path, sizeof(file_path), "%s%s", dir_path, MACRO_CONFIGS_FILE);
| ^~
macros.c:987:3: note: ‘snprintf’ output between 12 and 4107 bytes into a destination of size 4096
987 | snprintf(file_path, sizeof(file_path), "%s%s", dir_path, MACRO_CONFIGS_FILE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixed by 6bf1de9.
macros.c
andbtds4.c
both have minor issues with buffer size. The issue withbtds4.c
is inint btds4_init(int btds4_number, int dongle_index, const char * bdaddr_dst)
, line 897. This might fix this issue:For the problem in
macros.c
, I am not sure how to fix this. It is located instatic void read_configs_txt(const char* dir_path)
, line 990. PATH_MAX does not reflect the maximum length of paths on all systems, except Windows. This site has some info to explain: https://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html