[PATCH 1/5] cpuuse/cpuusagetop.c: Fix unused variable warning

Joel Sherrill joel at rtems.org
Sun Mar 20 20:40:49 UTC 2016


---
 cpukit/libmisc/cpuuse/cpuusagetop.c         | 1 -
 cpukit/score/src/threadglobalconstruction.c | 3 +++
 testsuites/sptests/Makefile.am              | 2 +-
 testsuites/sptests/sp13/task1.c             | 9 +++++----
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c b/cpukit/libmisc/cpuuse/cpuusagetop.c
index 9b92858..cf896e3 100644
--- a/cpukit/libmisc/cpuuse/cpuusagetop.c
+++ b/cpukit/libmisc/cpuuse/cpuusagetop.c
@@ -465,7 +465,6 @@ rtems_cpuusage_top_thread (rtems_task_argument arg)
     for (i = 0; i < data->task_count; i++)
     {
       Thread_Control*   thread = data->tasks[i];
-      Timestamp_Control last;
       Timestamp_Control usage;
       Timestamp_Control current_usage;
 
diff --git a/cpukit/score/src/threadglobalconstruction.c b/cpukit/score/src/threadglobalconstruction.c
index 1e84124..bc96317 100644
--- a/cpukit/score/src/threadglobalconstruction.c
+++ b/cpukit/score/src/threadglobalconstruction.c
@@ -62,5 +62,8 @@ void _Thread_Global_construction(
   _Thread_Restart( executing, executing, entry );
   _Thread_Enable_dispatch();
 
+#ifdef __GNUC__
+  __builtin_unreachable();
+#endif
   _Assert_Not_reached();
 }
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 43f3d82..53adfc1 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -65,7 +65,7 @@ _SUBDIRS += sptls03
 _SUBDIRS += spcpucounter01
 if HAS_CPLUSPLUS
 _SUBDIRS += spglobalcon01
-_SUBDIRS += sptls02
+## _SUBDIRS += sptls02
 endif
 _SUBDIRS += sptls01
 _SUBDIRS += spintrcritical20
diff --git a/testsuites/sptests/sp13/task1.c b/testsuites/sptests/sp13/task1.c
index e104e8d..58859c0 100644
--- a/testsuites/sptests/sp13/task1.c
+++ b/testsuites/sptests/sp13/task1.c
@@ -352,10 +352,11 @@ rtems_test_pause();
 
    for (cp = (big_receive_buffer + size);
         cp < (big_receive_buffer + sizeof(big_receive_buffer));
-        cp++)
-    if (*cp != 'Z') {
-      puts("TA1 - exact size overrun match failed");
-      rtems_test_exit(1);
+        cp++) {
+      if (*cp != 'Z') {
+        puts("TA1 - exact size overrun match failed");
+        rtems_test_exit(1);
+      }
     }
 
     /* all done with this one; delete it */
-- 
1.8.3.1



More information about the devel mailing list