From 4ad2c6a03ecb7faaf2658d3f8fb94f06441f2ba8 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Thu, 28 May 2020 18:02:55 +0100 Subject: Fix "enumeration values not handled in switch" error in testsuite 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/ChangeLog b/gdb/testsuite/ChangeLog index 2349c96..2aa42cd 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-05-28 Gary Benson + * gdb.base/sigaltstack.c (catcher): Add default case to switch + statement. + +2020-05-28 Gary Benson + * gdb.cp/classes.exp (prepare_for_testing): Add additional_flags=-Wno-deprecated-register. * gdb.cp/inherit.exp (prepare_for_testing): Likewise. 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 @@ catcher (int signal) case INNER: level = LEAF; return; + default: + abort (); } } -- cgit v1.1