Mark usage() method as noreturn to avoid warning on BSD

Warning from OpenBSD/NetBSD:
  CC iodine.c
  iodine.c: In function 'main':
  iodine.c:141:6: warning: 'nameservaddr_len' may be used uninitialized in this function
This commit is contained in:
Erik Ekman 2014-05-29 23:21:55 +02:00
parent c1b24abf3a
commit bacb69e4f0

View File

@ -57,6 +57,12 @@ sighandler(int sig)
client_stop(); client_stop();
} }
#if defined(__GNUC__) || defined(__clang__)
/* mark as no return to help some compilers to avoid warnings
* about use of uninitialized variables */
static void usage() __attribute__((noreturn));
#endif
static void static void
usage() { usage() {
extern char *__progname; extern char *__progname;