]> git.tue.mpg.de Git - adu.git/commitdiff
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 d052dfb953bf0f1f1159716107ed467e87436925..df68b67073bf41116859eaac633a2c5d0a835396 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);
+       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)