Skip to content

Commit a1ecd93

Browse files
committed
Fix compilation with -Werror
Fix this warning (which is error with -Werror): java_bytecode/remove_instanceof.cpp:258:10: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
1 parent 64034e0 commit a1ecd93

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

jbmc/src/java_bytecode/remove_instanceof.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ bool remove_instanceoft::lower_instanceof(
241241
goto_programt &goto_program,
242242
goto_programt::targett target)
243243
{
244+
bool changed;
245+
244246
if(
245247
target->is_target() &&
246248
(contains_instanceof(target->code()) ||
@@ -255,14 +257,16 @@ bool remove_instanceoft::lower_instanceof(
255257
++target;
256258
}
257259

258-
return lower_instanceof(
259-
function_identifier, target->code_nonconst(), goto_program, target) |
260-
(target->has_condition() ? lower_instanceof(
261-
function_identifier,
262-
target->condition_nonconst(),
263-
goto_program,
264-
target)
265-
: false);
260+
changed = lower_instanceof(
261+
function_identifier, target->code_nonconst(), goto_program, target);
262+
changed |=
263+
(target->has_condition() ? lower_instanceof(
264+
function_identifier,
265+
target->condition_nonconst(),
266+
goto_program,
267+
target)
268+
: false);
269+
return changed;
266270
}
267271

268272
/// Replace every instanceof in the passed function body with an explicit

0 commit comments

Comments
 (0)