Pull Request №728 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/fix/gcc16-debug-build
Merge: c0fbd1cd0e786b420b817fd4f560a487ab05a307←b6d8a8e1850c3b5c3e90ec93a5c969f39ae98036
Fix GCC 16 (trunk) debug build: real bug + dead unused-but-set-variable cleanup
----------------
Merge commit message:
Fix GCC 16 debug build: real bug fix plus dead unused-but-set-variable cleanup
GCC 16 (experimental trunk) enables -Werror=unused-but-set-variable more
aggressively and flags a genuine correctness issue in
CacheableResidueTypeSets's copy constructor.
- core/chemical/CacheableResidueTypeSets.cc: the copy constructor passed
*this (the not-yet-constructed destination object) to the base class
CacheableData's constructor instead of other (the fully-constructed
source). Harmless in practice today since CacheableData has no data
members of its own, but reads from an object mid-construction and is
the pattern GCC 16 correctly flags as -Wmaybe-uninitialized.
- protocols/simple_moves/MissingDensityToJumpMover.cc: the default
constructor called MissingDensityToJumpMover::get_name() (a qualified,
non-virtual call, but still a call through *this) from its own
mem-initializer-list to build the Mover base class's name argument.
get_name() just returns a string literal, so this is passed directly
instead, sidestepping the call-through-a-mid-construction-object
pattern GCC 16 flags.
- core/scoring/EnergyGraph.hh, core/pose/PDBInfo.cc,
core/io/mmtf/mmtf_writer.cc, protocols/cartesian/md.cc,
protocols/denovo_design/components/StructureDataFactory.cc,
protocols/denovo_design/movers/FoldArchitectMover.cc,
protocols/forge/methods/pose_mod.hh,
protocols/noesy_assign/DistanceScoreMover.cc,
protocols/noesy_assign/StructureDependentPeakCalibrator.cc: remove
loop counters (iilag, idx, chainIndex, modelIndex, imap, cur_chain,
count, current_pos, ct_peaks, pose_ct) that are incremented alongside
a real iterator but never read anywhere in their function. No
behavior change.
- core/pack/guidance_scoreterms/sap/SapConstraintHelper.cc: offset is
deliberately tracked "for symmetry" per an existing comment even
though never read; add an explicit (void) cast rather than removing
it, preserving that intent while satisfying the warning.