Skip to content

Commit

Permalink
Avoid warning about unused variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
cxbrooks committed Dec 31, 2014
1 parent 7f65c84 commit 7c83b22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions fmu10/src/models/fmuTemplate.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ fmiStatus fmiDoStep(fmiComponent c, fmiReal currentCommunicationPoint,
#endif
const int n = 10; // how many Euler steps to perform for one do step
#if NUMBER_OF_REALS>0
double prevState[max(NUMBER_OF_STATES, 1)];
//double prevState[max(NUMBER_OF_STATES, 1)];
#endif
#if NUMBER_OF_EVENT_INDICATORS>0
double prevEventIndicators[max(NUMBER_OF_EVENT_INDICATORS, 1)];
Expand Down Expand Up @@ -533,9 +533,9 @@ fmiStatus fmiDoStep(fmiComponent c, fmiReal currentCommunicationPoint,
comp->time += h;

#if NUMBER_OF_REALS>0
for (i=0; i<NUMBER_OF_STATES; i++) {
prevState[i] = r(vrStates[i]);
}
//for (i=0; i<NUMBER_OF_STATES; i++) {
// prevState[i] = r(vrStates[i]);
//}
for (i=0; i<NUMBER_OF_STATES; i++) {
fmiValueReference vr = vrStates[i];
r(vr) += h * getReal(comp, vr+1); // forward Euler step
Expand Down
8 changes: 4 additions & 4 deletions fmu20/src/models/fmuTemplate.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ fmi2Status fmi2DoStep(fmi2Component c, fmi2Real currentCommunicationPoint,
#endif
const int n = 10; // how many Euler steps to perform for one do step
#if NUMBER_OF_REALS>0
double prevState[max(NUMBER_OF_STATES, 1)];
//double prevState[max(NUMBER_OF_STATES, 1)];
#endif
#if NUMBER_OF_EVENT_INDICATORS>0
double prevEventIndicators[max(NUMBER_OF_EVENT_INDICATORS, 1)];
Expand Down Expand Up @@ -652,9 +652,9 @@ fmi2Status fmi2DoStep(fmi2Component c, fmi2Real currentCommunicationPoint,
comp->time += h;

#if NUMBER_OF_REALS>0
for (i = 0; i < NUMBER_OF_STATES; i++) {
prevState[i] = r(vrStates[i]);
}
//for (i = 0; i < NUMBER_OF_STATES; i++) {
// prevState[i] = r(vrStates[i]);
//}
for (i = 0; i < NUMBER_OF_STATES; i++) {
fmi2ValueReference vr = vrStates[i];
r(vr) += h * getReal(comp, vr + 1); // forward Euler step
Expand Down

0 comments on commit 7c83b22

Please sign in to comment.