diff --git a/src/xspice/icm/analog/pwl/cfunc.mod b/src/xspice/icm/analog/pwl/cfunc.mod index 9a2ee5d99..92052ee46 100644 --- a/src/xspice/icm/analog/pwl/cfunc.mod +++ b/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 */ diff --git a/src/xspice/icm/digital/d_jkff/cfunc.mod b/src/xspice/icm/digital/d_jkff/cfunc.mod index 26678c20e..2341b8f87 100644 --- a/src/xspice/icm/digital/d_jkff/cfunc.mod +++ b/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; - } /*============================================================================== diff --git a/src/xspice/icm/digital/d_tff/cfunc.mod b/src/xspice/icm/digital/d_tff/cfunc.mod index 5d09568e0..ec4cc84b0 100644 --- a/src/xspice/icm/digital/d_tff/cfunc.mod +++ b/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; }