[PATCH rtems-examples 22/23] ticker/low_ticker2: Fix warnings
Joel Sherrill
joel at rtems.org
Wed Feb 23 22:21:50 UTC 2022
---
ticker/low_ticker2/init.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/ticker/low_ticker2/init.c b/ticker/low_ticker2/init.c
index a687be9..f739f2a 100644
--- a/ticker/low_ticker2/init.c
+++ b/ticker/low_ticker2/init.c
@@ -16,20 +16,19 @@ rtems_task Test_task(
rtems_task_argument task_index
)
{
- rtems_status_code status;
rtems_interval ticks;
struct timespec uptime;
ticks = task_index * 5 * rtems_clock_get_ticks_per_second();
for ( ; ; ) {
- status = rtems_task_wake_after( ticks );
+ (void) rtems_task_wake_after( ticks );
- status = rtems_clock_get_uptime( &uptime );
+ (void) rtems_clock_get_uptime( &uptime );
if ( uptime.tv_sec >= 35 ) {
printk( "*** END OF LOW MEMORY CLOCK TICK TEST (delay) ***\n" );
rtems_shutdown_executive( 0 );
}
- printk( "TA%d - rtems_clock_uptime - %d:%d\n",
+ printk( "TA%d - rtems_clock_uptime - %lld:%ld\n",
task_index, uptime.tv_sec, uptime.tv_nsec
);
}
@@ -39,22 +38,24 @@ void *Init(
uintptr_t argument
)
{
- rtems_status_code status;
rtems_id id;
int i;
printk( "\n\n*** LOW MEMORY CLOCK TICK TEST (delay) ***\n" );
for (i=1 ; i<=3 ; i++ ) {
- status = rtems_task_create(
+ (void) rtems_task_create(
rtems_build_name( 'T', 'A', 0x30+1, ' ' ), 1, 0, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &id
);
- status = rtems_task_start( id, Test_task, i );
+ (void) rtems_task_start( id, Test_task, i );
}
- while( 1 )
+ while( 1 ) {
;
+ }
+
+ return NULL;
}
/**************** START OF CONFIGURATION INFORMATION ****************/
@@ -68,7 +69,7 @@ void *Init(
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512
#define CONFIGURE_MAXIMUM_PRIORITY 15
#define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
-#define CONFIGURE_IDLE_TASK_BODY Init
+#define CONFIGURE_IDLE_TASK_BODY (Thread_Idle_body) Init
#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
#define CONFIGURE_MAXIMUM_TASKS 3
--
1.8.3.1
More information about the devel
mailing list