From e334edd1715abe7a82fea118ef1efc57806e1fe9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 14 Mar 2015 10:52:24 -0500 Subject: tests misc: Disable deprecated method usage warning when intentional These tests intentionally use the deprecated method. Eventually this code in the sections can be deleted. --- testsuites/sptests/spclockget/init.c | 2 + testsuites/sptests/spnotepad01/init.c | 5 + testsuites/sptests/sptask_err04/task1.c | 344 +++++++++++++++++--------------- 3 files changed, 185 insertions(+), 166 deletions(-) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/spclockget/init.c b/testsuites/sptests/spclockget/init.c index 145beed12f..8cdae21cdb 100644 --- a/testsuites/sptests/spclockget/init.c +++ b/testsuites/sptests/spclockget/init.c @@ -14,6 +14,8 @@ #include #include "pritime.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + const char rtems_test_name[] = "SPCLOCKGET"; /* forward declarations to avoid warnings */ diff --git a/testsuites/sptests/spnotepad01/init.c b/testsuites/sptests/spnotepad01/init.c index 9604c32535..965d69dd2c 100644 --- a/testsuites/sptests/spnotepad01/init.c +++ b/testsuites/sptests/spnotepad01/init.c @@ -15,6 +15,11 @@ const char rtems_test_name[] = "SPNOTEPAD 1"; +/* + * We know this is deprecated and don't want a warning on every BSP built. + */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + /* forward declarations to avoid warnings */ rtems_task Init(rtems_task_argument argument); diff --git a/testsuites/sptests/sptask_err04/task1.c b/testsuites/sptests/sptask_err04/task1.c index 0d182e0a53..92ddb6d7ab 100644 --- a/testsuites/sptests/sptask_err04/task1.c +++ b/testsuites/sptests/sptask_err04/task1.c @@ -50,191 +50,203 @@ rtems_task Task_1( ); puts( "TA1 - rtems_task_delete - RTEMS_INVALID_ID" ); - /* NULL return */ - status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_FIRST, NULL ); - fatal_directive_status( - status, - RTEMS_INVALID_ADDRESS, - "rtems_task_get_note with NULL param" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS" ); + /** START OF NOTEPAD TESTS **/ - /* note too high */ - status = rtems_task_get_note( RTEMS_SELF, 100, ¬epad_value ); - fatal_directive_status( - status, - RTEMS_INVALID_NUMBER, - "rtems_task_get_note with illegal notepad" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER" ); + /* + * We know this is deprecated and don't want a warning on every BSP built. + */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" - /* bad Id */ - status = rtems_task_get_note( 100, RTEMS_NOTEPAD_LAST, ¬epad_value ); - fatal_directive_status( - status, - RTEMS_INVALID_ID, - "rtems_task_get_note with illegal id" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" ); + /* NULL return */ + status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_FIRST, NULL ); + fatal_directive_status( + status, + RTEMS_INVALID_ADDRESS, + "rtems_task_get_note with NULL param" + ); + puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS" ); - /* unused Id so invalid now */ - status = rtems_task_get_note( - Task_id[ 0 ], - RTEMS_NOTEPAD_LAST, - ¬epad_value - ); - fatal_directive_status( - status, - RTEMS_INVALID_ID, - "rtems_task_get_note with illegal id" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" ); + /* note too high */ + status = rtems_task_get_note( RTEMS_SELF, 100, ¬epad_value ); + fatal_directive_status( + status, + RTEMS_INVALID_NUMBER, + "rtems_task_get_note with illegal notepad" + ); + puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER" ); - status = rtems_task_get_note( - _RTEMS_tasks_Information.minimum_id + (3L<