Incidencia #45941

specenum_gen.h -Wtautological-constant-out-of-range-compare

Abrir Fecha: 2022-10-21 08:50 Última actualización: 2022-11-02 19:14

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
1

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 History (3/6 Histories)

2022-10-21 08:50 Updated by: cazfi
  • New Ticket "/specenum_gen.h -Wtautological-constant-out-of-range-compare" created
2022-10-21 08:51 Updated by: cazfi
  • Summary Updated
2022-10-22 11:36 Updated by: cazfi
  • Hito Update from (Ninguno) to 3.0.5 (cerrado)
  • Componente Update from (Ninguno) to General
Comentario

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.

2022-10-29 02:17 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2022-11-02 19:14 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar