testsuites/validation/tc-score-thread.c: Fix warning on assignment

GCC 14 is much pickier and turns some warnings into errors.
This is one example that cross BSPs and architectures.
This commit is contained in:
Joel Sherrill
2025-02-24 16:56:18 -06:00
committed by Gedare Bloom
parent 4fb6342a42
commit b6534f3047
13 changed files with 16 additions and 14 deletions

View File

@@ -477,7 +477,7 @@ static bool Stack_check_Visit_thread(
{
Stack_check_Visitor *visitor;
char name[ 22 ];
uintptr_t sp = (uintptr_t) _CPU_Context_Get_SP( &the_thread->Registers );
uintptr_t sp = _CPU_Context_Get_SP( &the_thread->Registers );
visitor = arg;
_Thread_Get_name( the_thread, name, sizeof( name ) );

View File

@@ -280,7 +280,7 @@ void _CPU_Context_Initialize(
);
#define _CPU_Context_Get_SP( _context ) \
(_context)->register_sp
(uintptr_t)(_context)->register_sp
#ifdef RTEMS_SMP
static inline bool _CPU_Context_Get_is_executing(

View File

@@ -433,7 +433,7 @@ void _CPU_Context_Initialize(
);
#define _CPU_Context_Get_SP( _context ) \
(_context)->register_sp
(uintptr_t)(_context)->register_sp
#ifdef RTEMS_SMP
static inline bool _CPU_Context_Get_is_executing(

View File

@@ -149,7 +149,7 @@ typedef struct {
} Context_Control;
#define _CPU_Context_Get_SP( _context ) \
(_context)->a7_msp
(uintptr_t)(_context)->a7_msp
/*
* Floating point context areas and support routines

View File

@@ -150,7 +150,7 @@ typedef struct {
* @return This method returns the stack pointer.
*/
#define _CPU_Context_Get_SP( _context ) \
(_context)->r1
(uintptr_t)(_context)->r1
#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0

View File

@@ -185,7 +185,7 @@ typedef struct {
} Context_Control;
#define _CPU_Context_Get_SP( _context ) \
(_context)->sp
(uintptr_t)(_context)->sp
typedef struct {
uint32_t special_interrupt_register;

View File

@@ -152,7 +152,7 @@ typedef struct {
} Context_Control;
#define _CPU_Context_Get_SP( _context ) \
(_context)->sp
(uintptr_t)(_context)->sp
typedef void CPU_Interrupt_frame;

View File

@@ -418,13 +418,15 @@ typedef struct {
* @addtogroup Management
*
* This macro returns the stack pointer associated with @a _context.
* The stack pointer returned is of type uintptr_t to support the
* use cases.
*
* @param[in] _context is the thread context area to access
*
* @return This method returns the stack pointer.
* @return This method returns the stack pointer as a uintptr_t.
*/
#define _CPU_Context_Get_SP( _context ) \
(_context)->stack_pointer
(uintptr_t)(_context)->stack_pointer
/**
* @addtogroup Management

View File

@@ -189,7 +189,7 @@ typedef struct {
} Context_Control;
#define _CPU_Context_Get_SP( _context ) \
(_context)->r1
(uintptr_t)(_context)->r1
typedef Context_Control CPU_Interrupt_frame;

View File

@@ -329,7 +329,7 @@ static inline ppc_context *ppc_get_context( const Context_Control *context )
}
#define _CPU_Context_Get_SP( _context ) \
ppc_get_context(_context)->gpr1
(uintptr_t)ppc_get_context(_context)->gpr1
#ifdef RTEMS_SMP
static inline bool _CPU_Context_Get_is_executing(

View File

@@ -141,7 +141,7 @@ typedef struct {
} Context_Control;
#define _CPU_Context_Get_SP( _context ) \
(_context)->sp
(uintptr_t)(_context)->sp
#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0

View File

@@ -410,7 +410,7 @@ typedef struct {
* CPU architecture dependent.
*/
#define _CPU_Context_Get_SP( _context ) \
(_context)->o6_sp
(uintptr_t)(_context)->o6_sp
#ifdef RTEMS_SMP
static inline bool _CPU_Context_Get_is_executing(

View File

@@ -116,7 +116,7 @@ typedef struct {
} Context_Control_fp;
#define _CPU_Context_Get_SP( _context ) \
(_context)->rsp
(uintptr_t)(_context)->rsp
#endif /* !ASM */