diff --git a/src/analyses/custom_bitvector_analysis.cpp b/src/analyses/custom_bitvector_analysis.cpp index be96ce1e2c2..cf19a7aa895 100644 --- a/src/analyses/custom_bitvector_analysis.cpp +++ b/src/analyses/custom_bitvector_analysis.cpp @@ -330,7 +330,8 @@ void custom_bitvector_domaint::transform( unsigned bit_nr= cba.get_bit_nr(code_function_call.arguments()[1]); - modet mode; + // initialize to make Visual Studio happy + modet mode = modet::SET_MUST; if(identifier=="__CPROVER_set_must") mode=modet::SET_MUST; @@ -458,7 +459,8 @@ void custom_bitvector_domaint::transform( unsigned bit_nr= cba.get_bit_nr(instruction.code.op1()); - modet mode; + // initialize to make Visual Studio happy + modet mode = modet::SET_MUST; if(statement=="set_must") mode=modet::SET_MUST; diff --git a/src/goto-diff/change_impact.cpp b/src/goto-diff/change_impact.cpp index e9e00bab388..1e916a5250a 100644 --- a/src/goto-diff/change_impact.cpp +++ b/src/goto-diff/change_impact.cpp @@ -571,7 +571,7 @@ void change_impactt::output_change_impact( const unsigned mod_flags= c_entry==c_i.end() ? SAME : c_entry->second; - char prefix; + char prefix = ' '; // syntactic changes are preferred over data/control-dependence // modifications if(mod_flags==SAME) @@ -639,7 +639,7 @@ void change_impactt::output_change_impact( const unsigned mod_flags= c_entry==n_c_i.end() ? SAME : c_entry->second; - char prefix; + char prefix = ' '; // syntactic changes are preferred over data/control-dependence // modifications if(mod_flags==SAME) @@ -691,7 +691,7 @@ void change_impactt::output_change_impact( const unsigned old_mod_flags= o_c_entry==o_c_i.end() ? SAME : o_c_entry->second; - char prefix; + char prefix = ' '; // syntactic changes are preferred over data/control-dependence // modifications if(old_mod_flags==SAME) diff --git a/src/goto-programs/remove_const_function_pointers.cpp b/src/goto-programs/remove_const_function_pointers.cpp index eefaf90d77f..2c2a0144583 100644 --- a/src/goto-programs/remove_const_function_pointers.cpp +++ b/src/goto-programs/remove_const_function_pointers.cpp @@ -398,7 +398,7 @@ bool remove_const_function_pointerst::try_resolve_expression( exprt simplified_expr=simplify_expr(expr, ns); bool resolved; expressionst resolved_expressions; - bool is_resolved_expression_const; + bool is_resolved_expression_const = false; if(simplified_expr.id()==ID_index) { const index_exprt &index_expr=to_index_expr(simplified_expr);