Fix "enumeration values not handled in switch" error in testsuite
authorGary Benson <gbenson@redhat.com>
Thu, 28 May 2020 17:02:55 +0000 (18:02 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 28 May 2020 17:02:55 +0000 (18:02 +0100)
When running the testsuite with clang, gdb.base/sigaltstack.c
fails to compile with the following error:
  warning: enumeration values 'LEAF' and 'NR_LEVELS' not handled
    in switch [-Wswitch]

This prevents the gdb.base/sigaltstack.exp from executing.
This commit fixes.

gdb/testsuite/ChangeLog:

* gdb.base/sigaltstack.c (catcher): Add default case to switch
statement.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/sigaltstack.c

index 2349c96dfc6dfb150cde90e9817eb24dcfc67063..2aa42cd75a359e24d7844a7b91d24b0a27570114 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-28  Gary Benson <gbenson@redhat.com>
+
+       * gdb.base/sigaltstack.c (catcher): Add default case to switch
+       statement.
+
 2020-05-28  Gary Benson <gbenson@redhat.com>
 
        * gdb.cp/classes.exp (prepare_for_testing): Add
index e52b4366aa2ea622b50d26b844805dce86902d91..9dec8a1d2fd445a27814fb392bac71ef6133e836 100644 (file)
@@ -68,6 +68,8 @@ catcher (int signal)
     case INNER:
       level = LEAF;
       return;
+    default:
+      abort ();
     }
 }