mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
GCC 7: Add __attribute__((noreturn)) to some usage functions which call exit.
This happens with GCC 7.0.1. The errors were all of the form:
qemu-speed-test.c: In function 'main':
qemu-speed-test.c:153:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
usage (EXIT_SUCCESS);
^~~~~~~~~~~~~~~~~~~~
qemu-speed-test.c:155:5: note: here
default:
^~~~~~~
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
extern int do_parse (struct parse_context *context, FILE *in);
|
||||
|
||||
static void
|
||||
static void __attribute__((noreturn))
|
||||
usage (int exit_status)
|
||||
{
|
||||
printf ("%s index\n", getprogname ());
|
||||
|
||||
@@ -88,7 +88,7 @@ static void print_longest_to_shortest (void);
|
||||
static void free_pass_data (void);
|
||||
static void free_final_timeline (void);
|
||||
|
||||
static void
|
||||
static void __attribute__((noreturn))
|
||||
usage (int exitcode)
|
||||
{
|
||||
guestfs_h *g;
|
||||
|
||||
@@ -51,7 +51,7 @@ static void run_test (void);
|
||||
static guestfs_h *create_handle (void);
|
||||
static void add_drive (guestfs_h *g);
|
||||
|
||||
static void
|
||||
static void __attribute__((noreturn))
|
||||
usage (int exitcode)
|
||||
{
|
||||
guestfs_h *g;
|
||||
|
||||
@@ -74,7 +74,7 @@ static void run_test (size_t P);
|
||||
static void *start_thread (void *thread_data_vp);
|
||||
static void message_callback (guestfs_h *g, void *opaque, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len);
|
||||
|
||||
static void
|
||||
static void __attribute__((noreturn))
|
||||
usage (int exitcode)
|
||||
{
|
||||
fprintf (stderr,
|
||||
|
||||
@@ -66,7 +66,7 @@ reset_default_tests (int *flag)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void __attribute__((noreturn))
|
||||
usage (int exitcode)
|
||||
{
|
||||
fprintf (stderr,
|
||||
|
||||
Reference in New Issue
Block a user