#233 cktdojob: Uninitialized variable: ANALmaxnum

closed-fixed
nobody
None
5
2013-02-14
2013-02-14
nafraf
No

Error detected using cppcheck tool.
[src/spicelib/analysis/cktdojob.c:41]: (error) Uninitialized variable: ANALmaxnum

Inside function CKTdoJob(...)
if WANT_SENSE2 defined, ANALmaxum variable is used as maximum limit in cycle, but it is not initialized.

-------- code -----
int ANALmaxnum;

#ifdef WANT_SENSE2
int senflag;
static int sens_num = -1;

/* Sensitivity is special */
if (sens_num < 0) {
for (i = 0; i < ANALmaxnum; i++)
if (!strcmp("SENS2", analInfo[i]->if_analysis.name))
break;
sens_num = i;
}
#endif

ANALmaxnum = spice_num_analysis();
-------

Discussion

  • Robert Larice

    Robert Larice - 2013-02-14

    Thank You,
    this is fixed now.
    Robert

     
  • Robert Larice

    Robert Larice - 2013-02-14
    • status: open --> closed-fixed
     

Log in to post a comment.