From 73c3543227ff8e2a771fc673078a814abdc37dd0 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Fri, 21 Aug 2020 11:02:18 +0200 Subject: [PATCH] Remove duplicate switch case. The empty 'f' case probably used to be wrapped in its own #if COLLECT_DAEMON, but that apparently somehow got lost and gcc 9.3 complains about the duplicate case. Therefore, just wrap the config->daemonize assignment into #if/#endif, like for the other cases. ChangeLog: collectd: Build fix --- src/daemon/collectd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index bc5cc54f7..2de0e1b10 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -334,9 +334,9 @@ static void read_cmdline(int argc, char **argv, struct cmdline_config *config) { #endif /* COLLECT_DAEMON */ break; case 'f': +#if COLLECT_DAEMON config->daemonize = false; - break; - case 'f': +#endif /* COLLECT_DAEMON */ break; case 'h': exit_usage(EXIT_SUCCESS); -- 2.47.2