From: Zbigniew Jędrzejewski-Szmek Date: Sun, 22 Jul 2012 12:42:09 +0000 (+0200) Subject: collect, keymap, systemctl: use _noreturn_ X-Git-Tag: v188~105 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=d91b8841d7a3ee08aa686852154b08a3e9eb9732 collect, keymap, systemctl: use _noreturn_ --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index e587cfbfa..18c8abeaa 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -5641,7 +5641,7 @@ done: return 0; } -static void halt_now(enum action a) { +static _noreturn_ void halt_now(enum action a) { /* Make sure C-A-D is handled by the kernel from this * point on... */ diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c index 777542979..80f464aff 100644 --- a/src/udev/collect/collect.c +++ b/src/udev/collect/collect.c @@ -33,6 +33,7 @@ #include "libudev.h" #include "libudev-private.h" +#include "macro.h" #define BUFSIZE 16 #define UDEV_ALARM_TIMEOUT 180 @@ -60,7 +61,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node) return container_of(node, struct _mate, node); } -static void sig_alrm(int signo) +_noreturn_ static void sig_alrm(int signo) { exit(4); } diff --git a/src/udev/keymap/keymap.c b/src/udev/keymap/keymap.c index 051aa4255..6dc9c2d20 100644 --- a/src/udev/keymap/keymap.c +++ b/src/udev/keymap/keymap.c @@ -40,6 +40,7 @@ const struct key* lookup_key (const char *str, unsigned int len); #include "keys-from-name.h" #include "keys-to-name.h" +#include "macro.h" #include "util.h" #define MAX_SCANCODES 1024 @@ -346,7 +347,7 @@ static void interactive(int fd) ioctl(fd, EVIOCGRAB, 0); } -static void help(int error) +_noreturn_ static void help(int error) { const char* h = "Usage: keymap []\n" " keymap scancode keyname [...]\n"