From 5ebdcd1b9f794752cb7d2e2e65942374b9b0f0d4 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Mon, 23 Dec 2024 06:44:28 -0800 Subject: [PATCH] Avoid unreachable code after a return statement Fix Coverity CID 445921: Control flow issues (UNREACHABLE). --- apps/avifgainmaputil/convert_command.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/avifgainmaputil/convert_command.cc b/apps/avifgainmaputil/convert_command.cc index b799eb5dfd..31f9e6ad36 100644 --- a/apps/avifgainmaputil/convert_command.cc +++ b/apps/avifgainmaputil/convert_command.cc @@ -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(arg_image_read_.pixel_format.value()); @@ -125,6 +124,7 @@ avifResult ConvertCommand::Run() { } return AVIF_RESULT_OK; +#endif // !defined(AVIF_ENABLE_JPEG_GAIN_MAP_CONVERSION) } } // namespace avif