From 4ad2c6a03ecb7faaf2658d3f8fb94f06441f2ba8 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Thu, 28 May 2020 18:02:55 +0100 Subject: [PATCH] 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 2349c96dfc6..2aa42cd75a3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gdb/testsuite/gdb.base/sigaltstack.c b/gdb/testsuite/gdb.base/sigaltstack.c index e52b4366aa2..9dec8a1d2fd 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 (); } } -- 2.30.2