-
Notifications
You must be signed in to change notification settings - Fork 461
CppCheck Cleanups #11319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CppCheck Cleanups #11319
Changes from all commits
d6a75bc
61bc36b
270103a
8a4e521
c40ef31
7e98d30
011884c
a7f2b51
1e3c22b
78860cc
907b6e0
334ab6f
a12526d
78decf6
8c5e976
4fe2225
8be0258
3e60d15
4d0a1c8
0f5eb74
f585416
bb5ae1f
99729f6
1efa267
c1f633d
18e8325
a9dc037
6bbb212
f6bc99e
3a0670d
c5eb8f2
30d1300
26630bf
b312eb3
d52eeb6
ee9aec7
4abe242
c3485f5
3eea010
ead0597
5b047b8
ece10e4
b773b2c
067da92
377391c
f539a4e
3cf34c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -213,12 +213,37 @@ jobs: | |
| --suppress=unusedFunction:src/EnergyPlus/api/state.cc | ||
| --suppress=unusedFunction:src/EnergyPlus/Psychrometrics.cc | ||
| --enable=all | ||
| -i EnergyPlus/DXCoils.cc | ||
| -i EnergyPlus/RefrigeratedCase.cc | ||
| -i EnergyPlus/SolarShading.cc | ||
| -j $(nproc) | ||
| --template='[{file}:{line}]:({severity}),[{id}],{message}' | ||
| --suppress="uninitvar:*" | ||
| --suppress="uninitvar:*" \ | ||
| --suppress="arrayIndexThenCheck:*" \ | ||
| --suppress="checkLevelNormal:*" \ | ||
| --suppress="constParameterPointer:*" \ | ||
| --suppress="constParameterReference:*" \ | ||
| --suppress="constVariable:*" \ | ||
| --suppress="constVariablePointer:*" \ | ||
| --suppress="constVariableReference:*" \ | ||
| --suppress="cstyleCast:*" \ | ||
| --suppress="duplicateCondition:*" \ | ||
| --suppress="duplicateExpression:*" \ | ||
| --suppress="knownConditionTrueFalse:*" \ | ||
| --suppress="multiCondition:*" \ | ||
| --suppress="noExplicitConstructor:*" \ | ||
| --suppress="passedByValueCallback:*" \ | ||
| --suppress="redundantAssignment:*" \ | ||
| --suppress="redundantCondition:*" \ | ||
| --suppress="redundantInitialization:*" \ | ||
| --suppress="sameIteratorExpression:*" \ | ||
| --suppress="shadowFunction:*" \ | ||
| --suppress="shadowVariable:*" \ | ||
| --suppress="unassignedVariable:*" \ | ||
| --suppress="unmatchedSuppression:*" \ | ||
| --suppress="unpreciseMathCall:*" \ | ||
| --suppress="unreadVariable:*" \ | ||
| --suppress="useInitializationList:*" \ | ||
| --suppress="useStlAlgorithm:*" \ | ||
| --suppress="uselessAssignmentArg:*" \ | ||
| --suppress="uselessCallsSubstr:*" \ | ||
|
Comment on lines
+218
to
+246
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These all exist currently, but we don't do anything about them. After this PR, cppcheck should be "clean." We will keep working to address these, but at least we will know if anything new is popping up after this. |
||
| ./src | ||
| 3>&1 1>&2 2>&3 | tee cppcheck.txt | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -775,10 +775,10 @@ void BaseSizer::calcCoilWaterFlowRates(EnergyPlusData &state, | |
| } | ||
| } | ||
| auto &plntComps = state.dataPlnt->PlantLoop(loopNum).plantCoilObjectNames; | ||
| auto &cmpType = state.dataPlnt->PlantLoop(loopNum).plantCoilObjectTypes; | ||
| int arrayIndex = -1; | ||
| // check if component has been added to array | ||
| if (!plntComps.empty()) { | ||
| auto &cmpType = state.dataPlnt->PlantLoop(loopNum).plantCoilObjectTypes; | ||
|
Comment on lines
-778
to
+781
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of these are just scope adjustments. I'm not going to review them individually. |
||
| for (size_t i = 0; i < plntComps.size(); ++i) { | ||
| if (plntComps[i] == compName && | ||
| cmpType[i] == static_cast<DataPlant::PlantEquipmentType>(getEnumValue(DataPlant::PlantEquipTypeNames, compType))) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1190,7 +1190,9 @@ void ConstructionProps::calculateExponentialMatrix() | |
|
|
||
| // Note With change to row-major arrays "row" here now means "column" | ||
|
|
||
| AMatRowNormMax = 0.0; // Start of Step 1 ... | ||
| // Start of Step 1 ... | ||
| // set to tiny value to avoid log(0) below | ||
| AMatRowNormMax = 1e-12; | ||
|
Comment on lines
+1193
to
+1195
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As stated, changed to avoid log(0) below. |
||
|
|
||
| for (i = 1; i <= this->rcmax; ++i) { | ||
|
|
||
|
|
||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were being ignored previously. Adding them back now.