Commit c1451885 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'float-1471-compilation-fix-for-wmc-tool-broke-stack-memory-calculation' into 'main'

[CI] Resolve "Compilation fix for WMC tool broke stack memory calculation"

See merge request !2643
parents 02579bc7 0f04d098
Loading
Loading
Loading
Loading
Loading
+4 −18
Original line number Diff line number Diff line
@@ -820,6 +820,7 @@ 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 */
@@ -839,13 +840,7 @@ 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;

@@ -950,14 +945,10 @@ void reset_mem( Counting_Size cnt_size )

void reset_stack( void )
{
    /* 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;

    /* initialize/reset stack pointers */
    ptr_base_stack = &something;
#endif
    ptr_max_stack = ptr_base_stack;
    ptr_current_stack = ptr_base_stack;

@@ -972,15 +963,10 @@ 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 */