Avoid gcc warning.
authorAndre Noll <maan@systemlinux.org>
Sun, 9 Jun 2013 16:31:55 +0000 (18:31 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 9 Jun 2013 17:47:54 +0000 (19:47 +0200)
Introduce a default case for the body of the switch statement in
print_statistics() to avoid the following gcc-4.8.1 warning:

select.c: In function 'print_statistics':
select.c:806:2: warning: enumeration value 'select_mode__NULL' not handled in switch [-Wswitch]
  switch (select_conf.select_mode_arg) {
  ^

select.c

index d052dfb..df68b67 100644 (file)
--- a/select.c
+++ b/select.c
@@ -811,9 +811,10 @@ static int print_statistics(struct format_info *fi)
                return print_user_lists(fi);
        case select_mode_arg_user_summary:
                return print_user_summary(fi);
                return print_user_lists(fi);
        case select_mode_arg_user_summary:
                return print_user_summary(fi);
+       default:
+               ERROR_LOG("bad select mode\n");
+               return -ERRNO_TO_ERROR(EINVAL);
        };
        };
-       ERROR_LOG("bad select mode\n");
-       return -ERRNO_TO_ERROR(EINVAL);
 }
 
 static int open_pipe(char *path)
 }
 
 static int open_pipe(char *path)