[PATCH 13/19] Disable deprecated warning on implementation of deprecated methods

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 16 20:29:30 UTC 2015


---
 cpukit/rtems/src/clockget.c                 |  6 ++++++
 cpukit/rtems/src/taskgetnote.c              |  5 +++++
 cpukit/rtems/src/tasks.c                    | 14 +++++++++++++-
 cpukit/rtems/src/tasksetnote.c              |  5 +++++
 cpukit/rtems/src/taskvariable_invoke_dtor.c |  5 +++++
 cpukit/rtems/src/taskvariableadd.c          |  5 +++++
 cpukit/rtems/src/taskvariabledelete.c       |  5 +++++
 cpukit/rtems/src/taskvariableget.c          |  5 ++---
 8 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/cpukit/rtems/src/clockget.c b/cpukit/rtems/src/clockget.c
index af14ad9..860e930 100644
--- a/cpukit/rtems/src/clockget.c
+++ b/cpukit/rtems/src/clockget.c
@@ -25,6 +25,12 @@
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 
+/*
+ * Ignore deprecated warning when compiling this method. We know
+ * this method is deprecated.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 rtems_status_code rtems_clock_get(
   rtems_clock_get_options  option,
   void                    *time_buffer
diff --git a/cpukit/rtems/src/taskgetnote.c b/cpukit/rtems/src/taskgetnote.c
index b748b8d..c097d9c 100644
--- a/cpukit/rtems/src/taskgetnote.c
+++ b/cpukit/rtems/src/taskgetnote.c
@@ -22,6 +22,11 @@
 #include <rtems/score/threadimpl.h>
 #include <rtems/config.h>
 
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 rtems_status_code rtems_task_get_note(
   rtems_id    id,
   uint32_t    notepad,
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index 237a313..5ed8915 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/rtems/src/tasks.c
@@ -60,10 +60,16 @@ static bool _RTEMS_tasks_Create_extension(
   created->task_variables = NULL;
 #endif
 
+  /*
+   * 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"
   if ( rtems_configuration_get_notepads_enabled() ) {
     for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
       api->Notepads[i] = 0;
   }
+  #pragma GCC diagnostic pop
 
   return true;
 }
@@ -107,9 +113,14 @@ static void _RTEMS_tasks_Terminate_extension(
   /*
    *  Free per task variable memory
    *
-   *  Per Task Variables are only enabled in uniprocessor configurations
+   *  Per Task Variables are only enabled in uniprocessor configurations.
    */
   #if !defined(RTEMS_SMP)
+    /*
+     * 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"
     do { 
       rtems_task_variable_t *tvp, *next;
 
@@ -121,6 +132,7 @@ static void _RTEMS_tasks_Terminate_extension(
 	tvp = next;
       }
     } while (0);
+    #pragma GCC diagnostic pop
   #endif
 
   /*
diff --git a/cpukit/rtems/src/tasksetnote.c b/cpukit/rtems/src/tasksetnote.c
index 36fc065..42cd4e7 100644
--- a/cpukit/rtems/src/tasksetnote.c
+++ b/cpukit/rtems/src/tasksetnote.c
@@ -22,6 +22,11 @@
 #include <rtems/score/threadimpl.h>
 #include <rtems/config.h>
 
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 rtems_status_code rtems_task_set_note(
   rtems_id id,
   uint32_t notepad,
diff --git a/cpukit/rtems/src/taskvariable_invoke_dtor.c b/cpukit/rtems/src/taskvariable_invoke_dtor.c
index 0627723..b9213f2 100644
--- a/cpukit/rtems/src/taskvariable_invoke_dtor.c
+++ b/cpukit/rtems/src/taskvariable_invoke_dtor.c
@@ -23,6 +23,11 @@
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/wkspace.h>
 
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 void _RTEMS_Tasks_Invoke_task_variable_dtor(
   Thread_Control        *the_thread,
   rtems_task_variable_t *tvp
diff --git a/cpukit/rtems/src/taskvariableadd.c b/cpukit/rtems/src/taskvariableadd.c
index c79195e..0fea945 100644
--- a/cpukit/rtems/src/taskvariableadd.c
+++ b/cpukit/rtems/src/taskvariableadd.c
@@ -24,6 +24,11 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/config.h>
 
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 rtems_status_code rtems_task_variable_add(
   rtems_id tid,
   void **ptr,
diff --git a/cpukit/rtems/src/taskvariabledelete.c b/cpukit/rtems/src/taskvariabledelete.c
index f5362f9..3f7f84e 100644
--- a/cpukit/rtems/src/taskvariabledelete.c
+++ b/cpukit/rtems/src/taskvariabledelete.c
@@ -24,6 +24,11 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/config.h>
 
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 rtems_status_code rtems_task_variable_delete(
   rtems_id  tid,
   void    **ptr
diff --git a/cpukit/rtems/src/taskvariableget.c b/cpukit/rtems/src/taskvariableget.c
index ba49b4d..3b9cd25 100644
--- a/cpukit/rtems/src/taskvariableget.c
+++ b/cpukit/rtems/src/taskvariableget.c
@@ -25,10 +25,9 @@
 #include <rtems/config.h>
 
 /*
- *  rtems_task_variable_get
- *
- *  This directive gets the value of a task variable.
+ * We know this is deprecated and don't want a warning on every BSP built.
  */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
 rtems_status_code rtems_task_variable_get(
   rtems_id tid,
-- 
1.9.3




More information about the devel mailing list