diff --git a/tgt-vvp/vvp_scope.c b/tgt-vvp/vvp_scope.c index 4bb7ecd91..8fbe614ad 100644 --- a/tgt-vvp/vvp_scope.c +++ b/tgt-vvp/vvp_scope.c @@ -1736,7 +1736,7 @@ static void draw_lpm_add(ivl_lpm_t net) type = "pow.s"; if (width > 8*sizeof(long)) { fprintf(stderr, "%s:%u: sorry (vvp-tgt): Signed power " - "result must be no more than %d bits.\n", + "result must be no more than %zu bits.\n", ivl_lpm_file(net), ivl_lpm_lineno(net), 8*sizeof(long)); exit(1); diff --git a/vvp/arith.cc b/vvp/arith.cc index 7ee51a451..0fd3041e4 100644 --- a/vvp/arith.cc +++ b/vvp/arith.cc @@ -781,6 +781,8 @@ void vvp_shiftr::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit) vvp_arith_real_::vvp_arith_real_() { + op_a_ = 0.0; + op_b_ = 0.0; } void vvp_arith_real_::dispatch_operand_(vvp_net_ptr_t ptr, double bit) diff --git a/vvp/compile.cc b/vvp/compile.cc index c826f5910..1028d0ce8 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -921,7 +921,7 @@ void compile_arith_div(char*label, long wid, bool signed_flag, assert( wid > 0 ); if (argc != 2) { - char *suffix = ""; + const char *suffix = ""; if (signed_flag) suffix = ".s"; fprintf(stderr, "%s; .arith/div%s has wrong number of " "symbols\n", label, suffix); @@ -1012,7 +1012,7 @@ void compile_arith_pow(char*label, long wid, bool signed_flag, } if (argc != 2) { - char *suffix = ""; + const char *suffix = ""; if (signed_flag) suffix = ".s"; fprintf(stderr, "%s .arith/pow%s has wrong number of " "symbols\n", label, suffix); diff --git a/vvp/delay.cc b/vvp/delay.cc index 078f409d2..85ed4d5ce 100644 --- a/vvp/delay.cc +++ b/vvp/delay.cc @@ -131,6 +131,7 @@ vvp_fun_delay::vvp_fun_delay(vvp_net_t*n, vvp_bit4_t init, const vvp_delay_t&d) : net_(n), delay_(d), cur_vec4_(1) { cur_vec4_.set_bit(0, init); + cur_real_ = 0.0; list_ = 0; initial_ = true; } diff --git a/vvp/vvp_net.cc b/vvp/vvp_net.cc index 8f54bf05f..cd989b1de 100644 --- a/vvp/vvp_net.cc +++ b/vvp/vvp_net.cc @@ -1964,6 +1964,7 @@ vvp_scalar_t vvp_fun_signal8::scalar_value(unsigned idx) const vvp_fun_signal_real::vvp_fun_signal_real() { + bits_ = 0.0; } double vvp_fun_signal_real::real_value() const