Skip to content

Commit

Permalink
Address warnings from GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
lefticus committed Feb 10, 2021
1 parent 8b1935b commit e413ed4
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/EnergyPlus/BoilerSteam.hh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace BoilerSteam {

void getSizingFactor(Real64 &sizFac) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initEachEnvironment(EnergyPlusData &state);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Boilers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace Boilers {

void SetupOutputVars(EnergyPlusData &state);

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initEachEnvironment(EnergyPlusData &state);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerAbsorption.hh
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ namespace ChillerAbsorption {

void onInitLoopEquip([[maybe_unused]] EnergyPlusData &state, const PlantLocation &calledFromLocation) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initEachEnvironment(EnergyPlusData &state);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerElectricEIR.hh
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ namespace ChillerElectricEIR {

void onInitLoopEquip(EnergyPlusData &state, const PlantLocation &calledFromLocation) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initEachEnvironment(EnergyPlusData &state);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerExhaustAbsorption.hh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ namespace ChillerExhaustAbsorption {

void onInitLoopEquip(EnergyPlusData &state, const PlantLocation &calledFromLocation) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void getDesignTemperatures(Real64 &TempDesCondIn, Real64 &TempDesEvapOut) override;

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerGasAbsorption.hh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ namespace ChillerGasAbsorption {

void getDesignTemperatures(Real64 &TempDesCondIn, Real64 &TempDesEvapOut) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initialize(EnergyPlusData &state);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerIndirectAbsorption.hh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ namespace ChillerIndirectAbsorption {

void onInitLoopEquip([[maybe_unused]] EnergyPlusData &state, const PlantLocation &calledFromLocation) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initialize(EnergyPlusData &state, bool RunFlag, Real64 MyLoad);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerReformulatedEIR.hh
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ namespace ChillerReformulatedEIR {

void onInitLoopEquip([[maybe_unused]] EnergyPlusData &state, const PlantLocation &calledFromLocation) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initialize(EnergyPlusData &state, bool RunFlag, Real64 MyLoad);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/CondenserLoopTowers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ namespace CondenserLoopTowers {

void onInitLoopEquip([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] const PlantLocation &calledFromLocation) override;

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initEachEnvironment(EnergyPlusData &state);

Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/FluidCoolers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,6 @@ namespace EnergyPlus::FluidCoolers {
// Based on InitTower subroutine by Don Shirey Sept/Oct 2002, F Buhl Oct 2002

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
bool ErrorsFound(false); // Flag if input data errors are found

if (this->oneTimeInitFlag) {
this->setupOutputVars(state);
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/FluidCoolers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace FluidCoolers {
{
}

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void initEachEnvironment(EnergyPlusData &state);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/PipeHeatTransfer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ namespace PipeHeatTransfer {

void PushInnerTimeStepArrays();

void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;

void InitPipesHeatTransfer(EnergyPlusData &state, bool FirstHVACIteration);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Pipes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace Pipes {

static PlantComponent *factory(EnergyPlusData &state, int objectType, std::string const &objectName);
void simulate([[maybe_unused]] EnergyPlusData &states, const PlantLocation &calledFromLocation, bool FirstHVACIteration, Real64 &CurLoad, bool RunFlag) override;
void oneTimeInit(EnergyPlusData &state);
void oneTimeInit(EnergyPlusData &state) override;
void initEachEnvironment(EnergyPlusData &state) const;
};

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ThermalISO15099Calc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ namespace EnergyPlus::ThermalISO15099Calc {
Real64 &ShadeHcModifiedOut,
Real64 &ShadeHcModifiedIn,
int const ThermalMod,
int const Debug_mode,
[[maybe_unused]] int const Debug_mode,
Real64 &AchievedErrorTolerance,
int &TotalIndex,
Real64 const edgeGlCorrFac)
Expand Down
2 changes: 1 addition & 1 deletion third_party/FMUParser/fmumini.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int mymkdir(dirname) const char *dirname;
return ret;
}

int makedir(newdir) char *newdir;
int makedir(newdir) const char *newdir;
{
char *buffer;
char *p;
Expand Down
6 changes: 6 additions & 0 deletions third_party/FMUParser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ int main(int argc, char *argv[])
case opt_delete:
printError("No FMU folder is given.\n");
break;
case opt_help:
// we know we cannot hit this block
break;
}

if (IS_WINDOWS) {
Expand Down Expand Up @@ -312,6 +315,9 @@ int main(int argc, char *argv[])
printDebug("Successfully printed the idf file.\n");
}
break;
case opt_help:
// Nothing to do here
break;
}

free(objNam);
Expand Down
2 changes: 1 addition & 1 deletion third_party/ssc/ssc/sscapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ SSCEXPORT int ssc_entry_version( ssc_entry_t p_entry )
}


SSCEXPORT const ssc_info_t ssc_module_var_info( ssc_module_t p_mod, int index )
SSCEXPORT ssc_info_t ssc_module_var_info( ssc_module_t p_mod, int index )
{
compute_module *cm = static_cast<compute_module*>(p_mod);
if (!cm) return 0;
Expand Down
2 changes: 1 addition & 1 deletion third_party/ssc/ssc/sscapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ SSCEXPORT void ssc_module_free( ssc_module_t p_mod );
}
\endverbatim
*/
SSCEXPORT const ssc_info_t ssc_module_var_info( ssc_module_t p_mod, int index );
SSCEXPORT ssc_info_t ssc_module_var_info( ssc_module_t p_mod, int index );

/** Returns variable type information: SSC_INPUT, SSC_OUTPUT, or SSC_INOUT */
SSCEXPORT int ssc_info_var_type( ssc_info_t p_inf );
Expand Down
5 changes: 4 additions & 1 deletion tst/EnergyPlus/api/TestFunctional.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@

int errorsOccurred = 0;
void errorHandler(int errortype, const char * message) {
(void)errortype;
(void)message;
errorsOccurred++;
}

Expand Down Expand Up @@ -88,7 +90,8 @@ int main() {
Real64 satVapCp = refrigerantSaturatedSpecificHeat(state, refrig, temperature, 1.0); // vap = 2,080 J/kgK
Real64 satVapEnth = refrigerantSaturatedEnthalpy(state, refrig, temperature, 1.0);
printf("C API Test: Sat Vap at 100C: rho=%8.4f, Cp=%8.4f, h=%8.4f\n", satVapDens, satVapCp, satVapEnth);
Real64 enthDifference = satVapEnth - satLiqEnth; // vap-liq = 2,675,570-419,170 ~ 2,256,400 J/kg
// Real64 enthDifference = satVapEnth - satLiqEnth; // vap-liq = 2,675,570-419,170 ~ 2,256,400 J/kg

// superheated properties aren't working, I think there is a bug in the FluidProperties module
// temperature = 150;
// Real64 supEnth = refrigerantSuperHeatedEnthalpy(refrig, temperature, thisPress);
Expand Down

3 comments on commit e413ed4

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake_modernize (lefticus) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3044 of 3044 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake_modernize (lefticus) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1568 of 1568 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake_modernize (lefticus) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (722 of 722 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.