Browse Source

com_measure2.c, uninitialized variable warning

rlar 15 years ago
parent
commit
6ab91f2e9f
  1. 4
      ChangeLog
  2. 9
      src/frontend/com_measure2.c

4
ChangeLog

@ -1,3 +1,7 @@
2011-06-30 Robert Larice
* src/frontend/com_measure2.c :
com_measure2.c, uninitialized variable warning
2011-06-30 Robert Larice 2011-06-30 Robert Larice
* src/spicelib/devices/bsim4/b4noi.c , * src/spicelib/devices/bsim4/b4noi.c ,
* src/spicelib/devices/hisim2/hsm2noi.c , * src/spicelib/devices/hisim2/hsm2noi.c ,

9
src/frontend/com_measure2.c

@ -383,10 +383,14 @@ static void com_measure_when(
struct dvec *d, *d2, *dScale; struct dvec *d, *d2, *dScale;
d = vec_get(meas->m_vec); d = vec_get(meas->m_vec);
if (meas->m_vec2) { if (meas->m_vec2) {
d2 = vec_get(meas->m_vec2); d2 = vec_get(meas->m_vec2);
has_d2 = TRUE; has_d2 = TRUE;
} else {
d2 = NULL;
} }
dScale = plot_cur->pl_scale; dScale = plot_cur->pl_scale;
if (d == NULL) { if (d == NULL) {
@ -394,7 +398,7 @@ static void com_measure_when(
return; return;
} }
if ((has_d2) && (d == NULL)) {
if (has_d2 && (d2 == NULL)) {
fprintf(cp_err, "Error: no such vector as %s.\n", meas->m_vec2); fprintf(cp_err, "Error: no such vector as %s.\n", meas->m_vec2);
return; return;
} }
@ -460,7 +464,10 @@ static void com_measure_when(
else { else {
value2 = d2->v_realdata[i]; value2 = d2->v_realdata[i];
} }
} else {
value2 = NAN;
} }
/* 'dc' is special: it may start at an arbitrary scale value. /* 'dc' is special: it may start at an arbitrary scale value.
Use m_td to store this value, a delay TD does not make sense */ Use m_td to store this value, a delay TD does not make sense */
if ((dc_check) && (i==0)) if ((dc_check) && (i==0))

Loading…
Cancel
Save