FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0428 — The library builds with 211 warnings under -Wall -Wextra
ID 0428
Class TEST
Severity 1
Status ready

Models: —

Found: 2026-10-24 review of 7c147a4 (doc/reviews/fhsim_marine_elements-2026-10-24/), finding B4

Evidence

With -Wall -Wextra (added in src/CMakeLists.txt, MARE-0411) a full gcc 12 Release build gives 211 warnings, in descending order: unused parameter (about 100: T, dT, X, creator, nStates), type qualifiers ignored on a return type (10), unknown #pragma warning (8), sign compare (8), multi-line comment (7), cable_data may be used uninitialized (4, check this one), misleading indentation (4), member initialiser order (4), unused-but-set variable (2). Files with most: net/Test/NetStructureTest.cpp 23, TrawlBeam.cpp 12, cable/RigidBarCable.cpp 12, cable/subroutines/RBCEngine.cpp 11, net/NetStructure.cpp 10.

Effect

No -Werror yet, so new warnings go unnoticed among the old ones.

Possible fix

Fix the maybe-uninitialized and misleading-indentation ones first, then the rest, then add -Werror as marenv has it.

Test that would prove it

The build with -Werror passes.

Risk

Warnings of other compilers (MSVC) are not counted here.