From 83de8de084de76938019f786f68ddf6d9a85b623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 20 Sep 2021 20:29:57 -0300 Subject: [PATCH] Specify that exit functions are noreturn. Fixes a warning on clang. --- dnsquery.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dnsquery.c b/dnsquery.c index 796af22..c2a8896 100644 --- a/dnsquery.c +++ b/dnsquery.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -26,14 +27,14 @@ #define BYTE1(x) (x & 0xff) #define BYTE2(x) ((x>>8)&0xff) -static void e(const char *str) +static noreturn void e(const char *str) { fputs(str, stderr); fputc('\n', stderr); exit(1); } -static void ep(const char *str, int v) +static noreturn void ep(const char *str, int v) { fprintf(stderr, "%s: %d\n", str, v); exit(1);