From 61a9284a7dbcffd2a770135d5f2482ae10459ab9 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 9 Jun 2013 18:31:55 +0200 Subject: [PATCH] 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) { ^ --- select.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.39.2