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.
This commit is contained in:
Gary Benson 2020-05-28 18:02:55 +01:00
parent a87e1817a4
commit 4ad2c6a03e
2 changed files with 7 additions and 0 deletions

View 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

View File

@ -68,6 +68,8 @@ catcher (int signal)
case INNER:
level = LEAF;
return;
default:
abort ();
}
}