Skip to content

Commit

Permalink
Fix compilation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Aug 27, 2024
1 parent 41f743e commit 7746349
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
11 changes: 6 additions & 5 deletions src/engine/common/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ SET_settings SET_Settings(char *fname)
int option;
double dres;
const char *sol;
const char *bdf;
cf = &cfg;
config_init(cf);
if (!config_read_file(cf, fname)) {
Expand Down Expand Up @@ -159,6 +158,7 @@ SET_settings SET_Settings(char *fname)
p->BDFPartitionDepth = 1;
p->CVODE_max_order = 0;
p->BDFMaxStep = 0;
p->x_output = 0;
if (config_lookup_float(cf, "minstep", &dres)) {
if (dres == 0) {
p->minstep = MIN_STEP;
Expand Down Expand Up @@ -223,10 +223,8 @@ SET_settings SET_Settings(char *fname)
if (config_lookup_int(cf, "bdf", &ires)) {
p->BDFPart = ires;
}
if (config_lookup_int(cf, "BDFPartitionDepth", &ires)) {
if (ires > 0) {
p->BDFPartitionDepth = ires;
}
if (config_lookup_int(cf, "BDFPartitionDepth", &ires) && ires > 0) {
p->BDFPartitionDepth = ires;
}
if (config_lookup_float(cf, "BDFMaxStep", &dres)) {
p->BDFMaxStep = dres;
Expand Down Expand Up @@ -281,6 +279,9 @@ SET_settings SET_Settings(char *fname)
}
p->partitionerOptions.nMetis = option;
}
if (config_lookup_int(cf, "XOutput", &ires)) {
p->x_output = ires;
}
config_destroy(cf);
return p;
}
Expand Down
4 changes: 2 additions & 2 deletions src/engine/qss/methods/liqss.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ void QSS_FUNC_DECL(LIQSS, nextTime)(QA_quantizer quantizer, int var, double t, d
void QSS_FUNC_DECL(LIQSS, updateQuantizedState)(QA_quantizer quantizer, int var, double *q, double *x, double *lqu)
{
int cf0 = var * 2, cf1 = cf0 + 1;
double dx;
double dx = 0;
double *u = quantizer->state->u0;
double *a = quantizer->state->a;
double dq;
double dq = 0;
quantizer->state->qAux[var] = q[cf0];
quantizer->state->oldDx[var] = x[cf1];
quantizer->state->lt[var] = *(quantizer->state->simTime);
Expand Down
1 change: 0 additions & 1 deletion src/engine/qss/methods/mliqss.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ void QSS_FUNC_DECL(mLIQSS, recomputeNextTime)(QA_quantizer quantizer, int i, dou
bool state_step = quantizer->state->lSimTime->type == ST_State;
double diff_Q;
bool *sim_step = quantizer->state->sim_step;
int *flag2 = quantizer->state->flag2;

if (t > 0 && state_step) {
diff_Q = q[2 * ifr_state] - quantizer->state->qAux[ifr_state];
Expand Down

0 comments on commit 7746349

Please sign in to comment.