From: Andre Noll Date: Sun, 9 Jun 2013 16:31:55 +0000 (+0200) Subject: Avoid gcc warning. X-Git-Tag: v1.0.0~20 X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=commitdiff_plain;h=61a9284a7dbcffd2a770135d5f2482ae10459ab9;ds=sidebyside Avoid gcc warning. 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) { ^ --- diff --git a/select.c b/select.c index d052dfb..df68b67 100644 --- 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)