Browse Source

initialize variables, add 'default:'

pre-master-46
Jim Monte 6 years ago
committed by Holger Vogt
parent
commit
2cac192814
  1. 6
      src/xspice/icm/analog/pwl/cfunc.mod
  2. 3
      src/xspice/icm/digital/d_jkff/cfunc.mod
  3. 1
      src/xspice/icm/digital/d_tff/cfunc.mod

6
src/xspice/icm/analog/pwl/cfunc.mod

@ -259,8 +259,10 @@ void cm_pwl(ARGS) /* structure holding parms,
double lower_slope; /* slope of the lower segment */
double upper_slope; /* slope of the upper segment */
double x_input; /* input */
double out; /* output */
double dout_din; /* partial derivative of the output wrt input */
double out = 0.0; /* output
* Init to 0 to suppress compiler warning */
double dout_din = 0.0; /* partial derivative of the output wrt input.
* Init to 0 to suppress compiler warning */
double threshold_lower; /* value below which the output begins smoothing */
double threshold_upper; /* value above which the output begins smoothing */
double test1; /* debug testing value */

3
src/xspice/icm/digital/d_jkff/cfunc.mod

@ -187,7 +187,7 @@ static Digital_State_t cm_eval_jk_result(Digital_State_t j_input,
Digital_State_t k_input,
Digital_State_t old_output)
{
Digital_State_t output; /* returned output value */
Digital_State_t output = UNKNOWN; /* returned output value */
switch (j_input) {
@ -228,7 +228,6 @@ static Digital_State_t cm_eval_jk_result(Digital_State_t j_input,
}
return output;
}
/*==============================================================================

1
src/xspice/icm/digital/d_tff/cfunc.mod

@ -580,6 +580,7 @@ void cm_d_tff(ARGS)
temp = *out_old;
break;
case UNKNOWN:
default:
temp = UNKNOWN;
break;
}

Loading…
Cancel
Save