From: Ruben Kerkhof Date: Sat, 5 Mar 2016 15:25:38 +0000 (+0100) Subject: Mark functions that exit as noreturn X-Git-Tag: collectd-5.6.0~419 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9b1ae7f672fd2712b452a58e0682cdea2e34c0f8;p=collectd.git Mark functions that exit as noreturn --- diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c index b17e47e2..49e84f35 100644 --- a/src/collectd-nagios.c +++ b/src/collectd-nagios.c @@ -245,6 +245,7 @@ static int match_range (range_t *range, double value) return (((ret - range->invert) == 0) ? 0 : 1); } /* int match_range */ +__attribute__((noreturn)) static void usage (const char *name) { fprintf (stderr, "Usage: %s <-s socket> <-n value_spec> <-H hostname> [options]\n" diff --git a/src/collectdmon.c b/src/collectdmon.c index 65271ddd..a5ed065d 100644 --- a/src/collectdmon.c +++ b/src/collectdmon.c @@ -69,7 +69,8 @@ static int restart = 0; static char *pidfile = NULL; static pid_t collectd_pid = 0; -static void exit_usage (char *name) +__attribute__((noreturn)) +static void exit_usage (const char *name) { printf ("Usage: %s [-- ]\n" diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index a970d03e..6f299174 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -269,6 +269,7 @@ static void update_kstat (void) /* TODO * Remove all settings but `-f' and `-C' */ +__attribute__((noreturn)) static void exit_usage (int status) { printf ("Usage: "PACKAGE_NAME" [OPTIONS]\n\n"