[rtems commit] libmisc/monitor/mon-task.c: Disable deprecated warning for use of notepads

Joel Sherril joel at rtems.org
Tue Mar 17 15:05:23 UTC 2015


Module:    rtems
Branch:    master
Commit:    0a6d12afb4531dd78b5d3855fb7c43b92a030519
Changeset: http://git.rtems.org/rtems/commit/?id=0a6d12afb4531dd78b5d3855fb7c43b92a030519

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Sat Mar 14 11:04:00 2015 -0500

libmisc/monitor/mon-task.c: Disable deprecated warning for use of notepads

---

 cpukit/libmisc/monitor/mon-task.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/cpukit/libmisc/monitor/mon-task.c b/cpukit/libmisc/monitor/mon-task.c
index c2218b5..c08f1d2 100644
--- a/cpukit/libmisc/monitor/mon-task.c
+++ b/cpukit/libmisc/monitor/mon-task.c
@@ -45,7 +45,18 @@ rtems_monitor_task_canonical(
 /* XXX if they are important enough to include anymore.   */
     canonical_task->modes = 0; /* XXX FIX ME.... rtems_thread->current_modes; */
     canonical_task->attributes = 0 /* XXX FIX ME rtems_thread->API_Extensions[ THREAD_API_RTEMS ]->attribute_set */;
-    (void) memcpy(canonical_task->notepad, api ->Notepads, sizeof(canonical_task->notepad));
+
+  /*
+   * 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() ) {
+    (void) memcpy(
+      canonical_task->notepad, api ->Notepads, sizeof(canonical_task->notepad));
+  }
+  #pragma GCC diagnostic pop
+
 /* XXX more to fix */
 /*
     (void) memcpy(&canonical_task->wait_args, &rtems_thread->Wait.Extra, sizeof(canonical_task->wait_args));
@@ -98,6 +109,14 @@ rtems_monitor_task_dump(
     }
 
     length += rtems_monitor_pad(72, length);
-    length += rtems_monitor_dump_notepad(monitor_task->notepad);
+
+    /*
+     * 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"
+      length += rtems_monitor_dump_notepad(monitor_task->notepad);
+    #pragma GCC diagnostic pop
+
     fprintf(stdout,"\n");
 }




More information about the vc mailing list