[OB PATCH] Fix "enumeration values not handled in switch" error in testsuite

Gary Benson gbenson@redhat.com
Thu May 28 17:03:30 GMT 2020


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              | 5 +++++
 gdb/testsuite/gdb.base/sigaltstack.c | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/gdb/testsuite/gdb.base/sigaltstack.c b/gdb/testsuite/gdb.base/sigaltstack.c
index e52b436..9dec8a1 100644
--- a/gdb/testsuite/gdb.base/sigaltstack.c
+++ b/gdb/testsuite/gdb.base/sigaltstack.c
@@ -68,6 +68,8 @@
     case INNER:
       level = LEAF;
       return;
+    default:
+      abort ();
     }
 }
 
-- 
1.8.3.1



More information about the Gdb-patches mailing list