Skip to content

Avoid implicit conversion to bool and actually use return value [blocks: #2310] #3373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/goto-programs/osx_fat_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,7 @@ bool osx_fat_readert::extract_gb(
{
PRECONDITION(has_gb_arch);

return run("lipo", {"lipo", "-thin", "hppa7100LC", "-output", dest, source});
return run(
"lipo", {"lipo", "-thin", "hppa7100LC", "-output", dest, source}) !=
0;
}
6 changes: 5 additions & 1 deletion src/goto-programs/read_goto_binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ bool read_goto_binary(
if(osx_fat_reader.has_gb())
{
temporary_filet tempname("tmp.goto-binary", ".gb");
osx_fat_reader.extract_gb(filename, tempname());
if(osx_fat_reader.extract_gb(filename, tempname()))
{
message.error() << "failed to extract goto binary" << messaget::eom;
return true;
}

std::ifstream temp_in(tempname(), std::ios::binary);
if(!temp_in)
Expand Down