Skip to content

Commit

Permalink
Avoid unreachable code after a return statement
Browse files Browse the repository at this point in the history
Fix Coverity CID 445921: Control flow issues (UNREACHABLE).
  • Loading branch information
wantehchang committed Dec 23, 2024
1 parent 3558451 commit 5ebdcd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/avifgainmaputil/convert_command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ avifResult ConvertCommand::Run() {
std::cout << "JPEG gainmap conversion unavailable because avifgainmaputil "
"was not built with libxml2.\n";
return AVIF_RESULT_NOT_IMPLEMENTED;
#endif

#else
const avifPixelFormat pixel_format =
static_cast<avifPixelFormat>(arg_image_read_.pixel_format.value());

Expand Down Expand Up @@ -125,6 +124,7 @@ avifResult ConvertCommand::Run() {
}

return AVIF_RESULT_OK;
#endif // !defined(AVIF_ENABLE_JPEG_GAIN_MAP_CONVERSION)
}

} // namespace avif

0 comments on commit 5ebdcd1

Please sign in to comment.