Skip to content

Commit 5b138b7

Browse files
committed
Avoid signed/unsigned casts and conversion in goto_inline
1 parent 0d7a943 commit 5b138b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/goto-programs/goto_inline_class.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ bool goto_inlinet::check_inline_map(
700700
if(call_list.empty())
701701
return true;
702702

703-
int ln=-1;
703+
unsigned ln = goto_programt::nil_target;
704704

705705
for(const auto &call : call_list)
706706
{
@@ -713,7 +713,7 @@ bool goto_inlinet::check_inline_map(
713713
#endif
714714

715715
// location numbers increasing
716-
if(static_cast<int>(target->location_number)<=ln)
716+
if(ln != goto_programt::nil_target && target->location_number <= ln)
717717
return false;
718718

719719
if(!target->is_function_call())

0 commit comments

Comments
 (0)