From 8d98e35772b2d758051d4b0ae61832eb84d5c98b Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 28 Nov 2025 10:58:53 +0100 Subject: [PATCH 1/3] add missing include --- lib_basop/move.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib_basop/move.h b/lib_basop/move.h index fc4d4e18b..1df6ae17d 100644 --- a/lib_basop/move.h +++ b/lib_basop/move.h @@ -37,6 +37,8 @@ #ifndef _MOVE_H #define _MOVE_H +#include "wmc_auto.h" + static __inline void move16( void ) { #ifdef WMOPS -- GitLab From 61c31ac7aec53aaf5027af5e498ca4ea44e3ce4a Mon Sep 17 00:00:00 2001 From: "Malenovsky, Vladimir" Date: Mon, 1 Dec 2025 13:22:53 +0100 Subject: [PATCH 2/3] add missing include, use stl.h instead of move.h --- lib_basop/move.h | 2 -- lib_com/hq2_noise_inject_fx.c | 2 +- lib_dec/fd_cng_dec_fx.c | 10 ++++------ lib_dec/ivas_ism_metadata_dec_fx.c | 4 ++-- lib_rend/lib_rend_fx.c | 14 +++++--------- 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/lib_basop/move.h b/lib_basop/move.h index 1df6ae17d..fc4d4e18b 100644 --- a/lib_basop/move.h +++ b/lib_basop/move.h @@ -37,8 +37,6 @@ #ifndef _MOVE_H #define _MOVE_H -#include "wmc_auto.h" - static __inline void move16( void ) { #ifdef WMOPS diff --git a/lib_com/hq2_noise_inject_fx.c b/lib_com/hq2_noise_inject_fx.c index 76efad10e..7fc9f8fe9 100644 --- a/lib_com/hq2_noise_inject_fx.c +++ b/lib_com/hq2_noise_inject_fx.c @@ -34,7 +34,7 @@ #include "options.h" #include "prot_fx.h" #include "oper_32b.h" -#include "move.h" +#include "stl.h" /*--------------------------------------------------------------------------* * hq2_noise_inject() diff --git a/lib_dec/fd_cng_dec_fx.c b/lib_dec/fd_cng_dec_fx.c index 0f8cec8e0..17a543038 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -3,17 +3,15 @@ ====================================================================================*/ -#include "basop32.h" +#include +#include +#include "options.h" +#include "stl.h" #include "cnst.h" -#include "enh1632.h" #include "ivas_cnst.h" #include "ivas_rom_com.h" -#include "move.h" #include "wmc_auto.h" -#include #include "typedef.h" -#include -#include "options.h" #include "rom_com.h" #include "stat_dec.h" #include "prot_fx.h" diff --git a/lib_dec/ivas_ism_metadata_dec_fx.c b/lib_dec/ivas_ism_metadata_dec_fx.c index a193cba2e..1a3f4bdfe 100644 --- a/lib_dec/ivas_ism_metadata_dec_fx.c +++ b/lib_dec/ivas_ism_metadata_dec_fx.c @@ -30,15 +30,15 @@ *******************************************************************************************************/ -#include "move.h" #include +#include #include "options.h" +#include "stl.h" #include "ivas_cnst.h" #include "ivas_prot_fx.h" #include "ivas_rom_com.h" #include "prot_fx.h" #include "ivas_stat_enc.h" -#include #include "wmc_auto.h" #include "ivas_prot_fx.h" diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index d45c79be0..fac70415a 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -30,14 +30,15 @@ *******************************************************************************************************/ -#include "basop32.h" -#include "basop_util.h" +#include +#include +#include #include "options.h" +#include "stl.h" +#include "basop_util.h" #include "cnst.h" #include "common_api_types.h" -#include "enh32.h" #include "lib_rend.h" -#include "move.h" #include "prot_fx.h" #include "ivas_prot_fx.h" #include "ivas_prot_rend_fx.h" @@ -47,11 +48,6 @@ #include "ivas_cnst.h" #include "ivas_rom_com.h" #include "ivas_rom_rend.h" -#include "stl.h" -#include "typedef.h" -#include -#include -#include #include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" -- GitLab From 1ce02a244a9e3c3fb175365efa28de4d70e00a7e Mon Sep 17 00:00:00 2001 From: "Malenovsky, Vladimir" Date: Mon, 1 Dec 2025 13:53:46 +0100 Subject: [PATCH 3/3] fix warnings about dangling pointer --- lib_debug/wmc_auto.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib_debug/wmc_auto.c b/lib_debug/wmc_auto.c index 5afd9de16..ce7b69e28 100644 --- a/lib_debug/wmc_auto.c +++ b/lib_debug/wmc_auto.c @@ -820,7 +820,6 @@ static void *mem_alloc_block( size_t size, const char *size_str ); void reset_mem( Counting_Size cnt_size ) { - int16_t something; size_t tmp_size; /* initialize list of stack records */ @@ -840,7 +839,13 @@ void reset_mem( Counting_Size cnt_size ) max_num_calls = MAX_NUM_RECORDS; /* initialize stack pointers */ +#if defined( __GNUC__ ) || defined( __clang__ ) + /* GCC/Clang: use builtin (works for many targets) */ + ptr_base_stack = __builtin_frame_address( 0 ); +#else + int16_t something; ptr_base_stack = &something; +#endif ptr_max_stack = ptr_base_stack; ptr_current_stack = ptr_base_stack; @@ -945,10 +950,14 @@ void reset_mem( Counting_Size cnt_size ) void reset_stack( void ) { - int16_t something; - /* initialize/reset stack pointers */ +#if defined( __GNUC__ ) || defined( __clang__ ) + /* GCC/Clang: use builtin (works for many targets) */ + ptr_base_stack = __builtin_frame_address( 0 ); +#else + int16_t something; ptr_base_stack = &something; +#endif ptr_max_stack = ptr_base_stack; ptr_current_stack = ptr_base_stack; @@ -963,10 +972,15 @@ void reset_stack( void ) int push_stack( const char *filename, const char *fctname ) { - int16_t something; int32_t current_stack_size; +#if defined( __GNUC__ ) || defined( __clang__ ) + /* GCC/Clang: use builtin (works for many targets) */ + ptr_base_stack = __builtin_frame_address( 0 ); +#else + int16_t something; ptr_current_stack = &something; +#endif (void) *filename; /* to avoid compilation warning */ -- GitLab