In an attempt to add Qt-client build to mac-meson CI job results in a lot of -Wtautological-constant-out-of-range-compare about specenum_gen.h
Starting with:
--
[530/700] Compiling C++ object freeciv-qt.p/meson-generated_moc_mapview.cpp.o
FAILED: freeciv-qt.p/meson-generated_moc_mapview.cpp.o
c++ -Ifreeciv-qt.p -I. -I.. -I../dependencies/luasql/src -I../dependencies/tinycthread -I../dependencies/tolua-5.2/include -I../dependencies/cvercmp -I../utility -I../common -I../common/networking -I../common/scriptcore -I../common/aicore -I../client -I../client/include -I../client/luascript -I../client/agents -I../client/gui-qt -I/usr/local/lib/QtCore.framework/Headers -I/usr/local/lib/QtGui.framework/Headers -I/usr/local/lib/QtWidgets.framework/Headers -I/usr/local/opt/readline/include -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -O0 -g -fPIC -Werror -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DHAVE_CONFIG_H -F/usr/local/lib -F/usr/local/lib -F/usr/local/lib -MD -MQ freeciv-qt.p/meson-generated_moc_mapview.cpp.o -MF freeciv-qt.p/meson-generated_moc_mapview.cpp.o.d -o freeciv-qt.p/meson-generated_moc_mapview.cpp.o -c freeciv-qt.p/moc_mapview.cpp
In file included from freeciv-qt.p/moc_mapview.cpp:10:
In file included from freeciv-qt.p/../../client/gui-qt/mapview.h:26:
In file included from ../client/include/mapview_g.h:20:
In file included from ../common/fc_types.h:359:
./specenum_gen.h:5452:18: error: result of comparison of constant 4 with expression of type 'enum casus_belli_range' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
The code is similar in all branches, so the build failure might come up in any branch at some point - that it has so far been seen with Meson builds only is likely just due to a bit different compiler flags there.
In an attempt to add Qt-client build to mac-meson CI job results in a lot of -Wtautological-constant-out-of-range-compare about specenum_gen.h
Starting with:
[530/700] Compiling C++ object freeciv-qt.p/meson-generated_moc_mapview.cpp.o
FAILED: freeciv-qt.p/meson-generated_moc_mapview.cpp.o
c++ -Ifreeciv-qt.p -I. -I.. -I../dependencies/luasql/src -I../dependencies/tinycthread -I../dependencies/tolua-5.2/include -I../dependencies/cvercmp -I../utility -I../common -I../common/networking -I../common/scriptcore -I../common/aicore -I../client -I../client/include -I../client/luascript -I../client/agents -I../client/gui-qt -I/usr/local/lib/QtCore.framework/Headers -I/usr/local/lib/QtGui.framework/Headers -I/usr/local/lib/QtWidgets.framework/Headers -I/usr/local/opt/readline/include -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -O0 -g -fPIC -Werror -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DHAVE_CONFIG_H -F/usr/local/lib -F/usr/local/lib -F/usr/local/lib -MD -MQ freeciv-qt.p/meson-generated_moc_mapview.cpp.o -MF freeciv-qt.p/meson-generated_moc_mapview.cpp.o.d -o freeciv-qt.p/meson-generated_moc_mapview.cpp.o -c freeciv-qt.p/moc_mapview.cpp
In file included from freeciv-qt.p/moc_mapview.cpp:10:
In file included from freeciv-qt.p/../../client/gui-qt/mapview.h:26:
In file included from ../client/include/mapview_g.h:20:
In file included from ../common/fc_types.h:359:
./specenum_gen.h:5452:18: error: result of comparison of constant 4 with expression of type 'enum casus_belli_range' is always true [-Werror,-Wtautological-constant-out-of-range-compare]