Skip to content

Commit

Permalink
counters need to be size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kroening committed Sep 17, 2017
1 parent 2a7a0e8 commit cef7659
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cbmc/show_vcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void bmct::show_vcc_plain(std::ostream &out)
symex_target_equationt::SSA_stepst::const_iterator
last_it=has_threads?equation.SSA_steps.end():s_it;

for(unsigned count=1; p_it!=last_it; p_it++)
for(std::size_t count=1; p_it!=last_it; p_it++)
if(p_it->is_assume() || p_it->is_assignment() || p_it->is_constraint())
{
if(!p_it->ignore)
Expand Down
8 changes: 4 additions & 4 deletions src/goto-programs/set_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void label_properties(goto_modelt &goto_model)

void label_properties(
goto_programt &goto_program,
std::map<irep_idt, unsigned> &property_counters)
std::map<irep_idt, std::size_t> &property_counters)
{
for(goto_programt::instructionst::iterator
it=goto_program.instructions.begin();
Expand Down Expand Up @@ -75,7 +75,7 @@ void label_properties(
if(prefix!="")
prefix+=".";

unsigned &count=property_counters[prefix];
std::size_t &count=property_counters[prefix];

count++;

Expand All @@ -87,7 +87,7 @@ void label_properties(

void label_properties(goto_programt &goto_program)
{
std::map<irep_idt, unsigned> property_counters;
std::map<irep_idt, std::size_t> property_counters;
label_properties(goto_program, property_counters);
}

Expand Down Expand Up @@ -116,7 +116,7 @@ void set_properties(

void label_properties(goto_functionst &goto_functions)
{
std::map<irep_idt, unsigned> property_counters;
std::map<irep_idt, std::size_t> property_counters;

for(goto_functionst::function_mapt::iterator
it=goto_functions.function_map.begin();
Expand Down
2 changes: 1 addition & 1 deletion src/goto-symex/symex_function_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void goto_symext::parameter_assignments(
if(function_type.has_ellipsis())
{
// These are va_arg arguments; their types may differ from call to call
unsigned va_count=0;
std::size_t va_count=0;
const symbolt *va_sym=nullptr;
while(!ns.lookup(
id2string(function_identifier)+"::va_arg"+std::to_string(va_count),
Expand Down
2 changes: 1 addition & 1 deletion src/util/irep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ std::string irept::pretty(unsigned indent, unsigned max_indent) const
result+=it->second.pretty(indent+2, max_indent);
}

unsigned count=0;
std::size_t count=0;

forall_irep(it, get_sub())
{
Expand Down

0 comments on commit cef7659

Please sign in to comment.