From 2417d354c5707c8159e964e92fd07231b78cbccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Wed, 30 Jul 2025 22:37:01 +0200 Subject: [PATCH] Make wmc_tool happy again --- lib_com/tools.c | 4 +++- lib_rend/lib_rend.c | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib_com/tools.c b/lib_com/tools.c index cb1d121629..224c28fa4e 100644 --- a/lib_com/tools.c +++ b/lib_com/tools.c @@ -1743,9 +1743,11 @@ int16_t is_numeric_float( float x ) { #ifdef CODE_IMPROVEMENTS + int16_t retval; #define WMC_TOOL_SKIP - return (int16_t) ( !isnan( x ) && !isinf( x ) ); + retval = (int16_t) ( !isnan( x ) && !isinf( x ) ); #undef WMC_TOOL_SKIP + return retval; #else #ifndef BASOP_NOGLOB union float_int diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d9866de050..214712487a 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3308,10 +3308,14 @@ static void *getInputByIndex( case IVAS_REND_AUDIO_CONFIG_TYPE_MASA: return (input_masa *) inputsArray + index; default: - /* this should be unreachable */ - assert( 0 ); - return NULL; + break; } + + /* this should be unreachable */ + assert( 0 ); + + /* include a final return to make the linter happy and avoid problems with wmc_tool (see #1355) */ + return NULL; } #endif -- GitLab