summaryrefslogtreecommitdiffstats
path: root/classic_api
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2022-02-23 16:16:20 -0600
committerJoel Sherrill <joel@rtems.org>2022-02-23 16:17:54 -0600
commit43702c8507591bbb95d5648b606a3f6091a5cacf (patch)
tree69600fe54f56310d46abce1242ed6d3f238b2f8b /classic_api
parentclassic_api/classic_signal: Fix warnings (diff)
downloadrtems-examples-43702c8507591bbb95d5648b606a3f6091a5cacf.tar.bz2
misc/minimum/: Fix warnings
Diffstat (limited to 'classic_api')
-rw-r--r--classic_api/triple_period/init.c17
-rw-r--r--classic_api/triple_period/tasks.c14
2 files changed, 13 insertions, 18 deletions
diff --git a/classic_api/triple_period/init.c b/classic_api/triple_period/init.c
index 0b05be6..52be9a9 100644
--- a/classic_api/triple_period/init.c
+++ b/classic_api/triple_period/init.c
@@ -23,7 +23,6 @@ rtems_task Init(
rtems_task_argument argument
)
{
- rtems_status_code status;
rtems_time_of_day time;
uint32_t ticks_per_second, ticks_since_boot;
@@ -44,32 +43,32 @@ rtems_task Init(
time.second = 0;
time.ticks = 0;
- status = rtems_clock_set( &time );
+ (void) rtems_clock_set( &time );
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
// prototype: rtems_task_create( name, initial_priority, stack_size, initial_modes, attribute_set, *id );
- status = rtems_task_create(
+ (void) rtems_task_create(
Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
);
- status = rtems_task_create(
+ (void) rtems_task_create(
Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
);
- status = rtems_task_create(
+ (void) rtems_task_create(
Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
);
// prototype: rtems_task_start( id, entry_point, argument );
- status = rtems_task_start( Task_id[ 1 ], Task_Absolute_Period, 1 );
- status = rtems_task_start( Task_id[ 2 ], Task_Rate_Monotonic_Period, 2 );
- status = rtems_task_start( Task_id[ 3 ], Task_Relative_Period, 3 );
+ (void) rtems_task_start( Task_id[ 1 ], Task_Absolute_Period, 1 );
+ (void) rtems_task_start( Task_id[ 2 ], Task_Rate_Monotonic_Period, 2 );
+ (void) rtems_task_start( Task_id[ 3 ], Task_Relative_Period, 3 );
// delete init task after starting the three working tasks
- status = rtems_task_delete( RTEMS_SELF );
+ (void) rtems_task_delete( RTEMS_SELF );
}
diff --git a/classic_api/triple_period/tasks.c b/classic_api/triple_period/tasks.c
index 0e29d0c..fb92e30 100644
--- a/classic_api/triple_period/tasks.c
+++ b/classic_api/triple_period/tasks.c
@@ -20,8 +20,6 @@
#define PERIOD_TASK_RATE_MONOTONIC 2
#define PERIOD_TASK_RELATIVE 3
-
-
// TASK 1
//
// * Absolute timing for task 1
@@ -33,7 +31,6 @@ rtems_task Task_Absolute_Period(
)
{
rtems_time_of_day time;
- rtems_status_code status;
uint32_t ticks_since_boot;
uint32_t count;
@@ -41,7 +38,7 @@ rtems_task Task_Absolute_Period(
rtems_cpu_usage_reset();
while( 1 ) {
- status = rtems_clock_get_tod( &time );
+ (void) rtems_clock_get_tod( &time );
count++;
// sets end criteria for demo application (60 seconds)
@@ -70,7 +67,7 @@ rtems_task Task_Absolute_Period(
time.ticks = 0; // 'ticks' is don't care. rtems_task_wake_when() has a
// granularity of 1 second and zeroes time.ticks
- status = rtems_task_wake_when( &time );
+ (void) rtems_task_wake_when( &time );
// dump CPU usage every 5th period
if( 0 == (count % 5) ) {
@@ -100,7 +97,7 @@ rtems_task Task_Rate_Monotonic_Period(
count = 0;
while( 1 ) {
- status = rtems_clock_get_tod( &time );
+ (void) rtems_clock_get_tod( &time );
count++;
printf( "\n\nTask 2 - activating every %d second using rate monotonic manager to schedule (rtems_rate_monotonic_period)\n", PERIOD_TASK_RATE_MONOTONIC);
@@ -158,11 +155,10 @@ rtems_task Task_Relative_Period(
)
{
rtems_time_of_day time;
- rtems_status_code status;
uint32_t ticks_since_boot;
while( 1 ) {
- status = rtems_clock_get_tod( &time );
+ (void) rtems_clock_get_tod( &time );
printf(
"\n\nTask 3 - activating after every %d second using relative "
@@ -175,7 +171,7 @@ rtems_task Task_Relative_Period(
printf(" - Ticks since boot: %" PRIu32 "\n", ticks_since_boot);
// Every N3 seconds
- status = rtems_task_wake_after(
+ (void) rtems_task_wake_after(
rtems_clock_get_ticks_per_second() * PERIOD_TASK_RELATIVE
);
}