mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-18 04:11:15 +08:00
sp19, tm26: Address set but unused warnings
GCC 16 flagged this while GCC 15 did not. On some targets, the macros used to ensure the floating point context was fully in use with task specific values would result in set but unused warnings. Tweaked the tests and macros as needed to eliminate the warnings.
This commit is contained in:
committed by
Gedare Bloom
parent
64d49f6585
commit
f22c306945
@@ -57,6 +57,8 @@ rtems_task First_FP_task( rtems_task_argument argument )
|
||||
INTEGER_factors[ task_index ]
|
||||
);
|
||||
put_name( Task_name[ task_index ], FALSE );
|
||||
FP_CHECK( FP_factors[ task_index ] );
|
||||
INTEGER_CHECK( INTEGER_factors[ task_index ] );
|
||||
#if ( RTEMS_HAS_HARDWARE_FP == 1 )
|
||||
printf( " - float base = (%g)\n", FP_factors[ task_index ] );
|
||||
#else
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
#define FP_DECLARE
|
||||
#define FP_LOAD( _factor )
|
||||
#define FP_CHECK( _factor ) 0
|
||||
#define FP_CHECK( _factor )
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -399,6 +399,12 @@ rtems_task Floating_point_task_1( rtems_task_argument argument )
|
||||
Thread_Control *executing;
|
||||
FP_DECLARE;
|
||||
|
||||
int task_index = argument; /* task_index is used by FP_CHECK */
|
||||
|
||||
FP_LOAD( 1.0 );
|
||||
FP_CHECK( 1.0 );
|
||||
(void) task_index;
|
||||
|
||||
context_switch_restore_1st_fp_time = benchmark_timer_read();
|
||||
|
||||
executing = _Thread_Get_executing();
|
||||
@@ -427,6 +433,7 @@ rtems_task Floating_point_task_1( rtems_task_argument argument )
|
||||
context_switch_save_idle_restore_initted_time = benchmark_timer_read();
|
||||
|
||||
FP_LOAD( 1.0 );
|
||||
FP_CHECK( 1.0 );
|
||||
|
||||
executing = _Thread_Get_executing();
|
||||
|
||||
@@ -457,6 +464,12 @@ rtems_task Floating_point_task_2( rtems_task_argument argument )
|
||||
Thread_Control *executing;
|
||||
FP_DECLARE;
|
||||
|
||||
int task_index = argument; /* task_index is used by FP_CHECK */
|
||||
|
||||
FP_LOAD( 1.0 );
|
||||
FP_CHECK( 1.0 );
|
||||
(void) task_index;
|
||||
|
||||
context_switch_save_restore_idle_time = benchmark_timer_read();
|
||||
|
||||
executing = _Thread_Get_executing();
|
||||
|
||||
Reference in New Issue
Block a user