diff options
author | Gary Benson <gbenson@redhat.com> | 2020-05-28 18:02:55 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2020-05-28 18:02:55 +0100 |
commit | 4ad2c6a03ecb7faaf2658d3f8fb94f06441f2ba8 (patch) | |
tree | 32c40df7a3f42ab4ef081f103924d69a2e610ed0 | |
parent | a87e1817a435dab6c6c042f9306497c9f13d4236 (diff) | |
download | gdb-4ad2c6a03ecb7faaf2658d3f8fb94f06441f2ba8.zip gdb-4ad2c6a03ecb7faaf2658d3f8fb94f06441f2ba8.tar.gz gdb-4ad2c6a03ecb7faaf2658d3f8fb94f06441f2ba8.tar.bz2 |
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.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/sigaltstack.c | 2 |
2 files changed, 7 insertions, 0 deletions
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 <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 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 (); } } |