Skip to content

Commit 7c767ab

Browse files
author
Daniel Kroening
authored
Merge pull request diffblue#2485 from tautschnig/vs-unreachable
Remove unreachable instructions
2 parents 5918640 + 6665c69 commit 7c767ab

File tree

5 files changed

+3
-13
lines changed

5 files changed

+3
-13
lines changed

src/cpp/parse.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2386,8 +2386,6 @@ bool Parser::optAttribute(typet &t)
23862386
return false;
23872387
}
23882388
}
2389-
2390-
return true;
23912389
}
23922390

23932391
/*

src/goto-cc/as_mode.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ int as_modet::as_hybrid_binary()
366366

367367
#else
368368
error() << "binary merging not implemented for this platform" << eom;
369-
return 1;
369+
result = 1;
370370
#endif
371371

372372
return result;

src/pointer-analysis/goto_program_dereference.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,11 @@ bool goto_program_dereferencet::is_valid_object(
5454
return true; // global/static
5555

5656
#if 0
57-
if(valid_local_variables->find(symbol.name)!=
58-
valid_local_variables->end())
59-
return true; // valid local
57+
return valid_local_variables->find(symbol.name)!=
58+
valid_local_variables->end(); // valid local
6059
#else
6160
return true;
6261
#endif
63-
64-
return false;
6562
}
6663

6764
void goto_program_dereferencet::dereference_failure(

src/util/simplify_expr_int.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -1483,9 +1483,6 @@ bool simplify_exprt::simplify_inequality(exprt &expr)
14831483
// both are not constant
14841484
return simplify_inequality_not_constant(expr);
14851485
}
1486-
1487-
UNREACHABLE;
1488-
return false;
14891486
}
14901487

14911488
bool simplify_exprt::eliminate_common_addends(

src/util/simplify_expr_pointer.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,6 @@ bool simplify_exprt::simplify_pointer_offset(exprt &expr)
403403

404404
return false;
405405
}
406-
407-
return true;
408406
}
409407

410408
return true;

0 commit comments

Comments
 (0)