Issue overview
Cppcheck is flagging a couple of knownConditionTrueFalse cases that look like dead branch logic caused by hard-coded local flags.
Two current examples:
- In
ThermalISO15099Calc::Calc_ISO15099 (here and there), UnshadedDebug is initialized to 0 with a comment indicating unshaded debug output was removed for now. Both if (files.WriteDebugOutput && (UnshadedDebug == 1)) blocks are therefore unreachable. This looks like leftover disabled debug code.
- In
WindowEquivalentLayer::VB_SOL46_CURVE (here), CORR is initialized to 1 and never modified, so if (CORR > 0) is always true and the else path is unreachable. This looks like leftover on/off flag logic for slat-curvature correction rather than an active runtime branch.
Suggested cleanup:
- remove dead branches if the behavior is intentionally fixed/disabled, or
- reconnect the flags to real configuration/input paths if they are supposed to remain functional.
It would also reduce cppcheck noise and make the code intent clearer.
Operating System (Multiple choices)
Windows
Operating System Version
11
Version of EnergyPlus
26.1.0
Unmethours link or helpdesk ticket number
N/A
Defect file
No response
Issue overview
Cppcheck is flagging a couple of
knownConditionTrueFalsecases that look like dead branch logic caused by hard-coded local flags.Two current examples:
ThermalISO15099Calc::Calc_ISO15099(here and there),UnshadedDebugis initialized to 0 with a comment indicating unshaded debug output was removed for now. Bothif (files.WriteDebugOutput && (UnshadedDebug == 1))blocks are therefore unreachable. This looks like leftover disabled debug code.WindowEquivalentLayer::VB_SOL46_CURVE(here),CORRis initialized to 1 and never modified, soif (CORR > 0)is always true and theelsepath is unreachable. This looks like leftover on/off flag logic for slat-curvature correction rather than an active runtime branch.Suggested cleanup:
It would also reduce cppcheck noise and make the code intent clearer.
Operating System (Multiple choices)
Windows
Operating System Version
11
Version of EnergyPlus
26.1.0
Unmethours link or helpdesk ticket number
N/A
Defect file
No response