#45941: /specenum_gen.h -Wtautological-constant-out-of-range-compare Open Date: 2022-10-21 02:50 Last Update: 2022-10-21 02:50 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45941 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45941 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-10-21 02:50 Updated by: cazfi * New Ticket "/specenum_gen.h -Wtautological-constant-out-of-range-compare" created --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: (None) Component: (None) Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: 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] if (enumerator < ARRAY_SIZE(names)) { -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/45941 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45941