From: Christophe CURIS <[email protected]> clang is a bit more strict on the attribute usage, so let's comply.
Signed-off-by: Christophe CURIS <[email protected]> --- util/convertfonts.c | 8 +++++++- util/geticonset.c | 8 +++++++- util/getstyle.c | 8 +++++++- util/seticons.c | 8 +++++++- util/setstyle.c | 8 +++++++- util/wdread.c | 7 ++++++- util/wdwrite.c | 8 ++++++-- util/wmgenmenu.c | 8 +++++++- util/wmsetbg.c | 10 +++++++--- 9 files changed, 61 insertions(+), 12 deletions(-) diff --git a/util/convertfonts.c b/util/convertfonts.c index 4a22fcc..b46594b 100644 --- a/util/convertfonts.c +++ b/util/convertfonts.c @@ -23,6 +23,8 @@ #define _GNU_SOURCE /* getopt_long */ #endif +#include "config.h" + #include <sys/stat.h> #include <getopt.h> @@ -31,6 +33,10 @@ #include <stdlib.h> #include <string.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "../src/wconfig.h" @@ -54,7 +60,7 @@ char *FontOptions[] = { extern char *__progname; -static void print_help(int print_usage, int exitval) +static noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [-h] [-v] [--keep-xlfd] <style_file>\n", __progname); if (print_usage) { diff --git a/util/geticonset.c b/util/geticonset.c index 98c9b9d..3c9dea8 100644 --- a/util/geticonset.c +++ b/util/geticonset.c @@ -23,18 +23,24 @@ #define _GNU_SOURCE /* getopt_long */ #endif +#include "config.h" + #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "../src/wconfig.h" extern char *__progname; -static void print_help(int print_usage, int exitval) +static noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [-h] [-v] [file]\n", __progname); if (print_usage) { diff --git a/util/getstyle.c b/util/getstyle.c index ad7a493..66548e7 100644 --- a/util/getstyle.c +++ b/util/getstyle.c @@ -23,6 +23,8 @@ #define _GNU_SOURCE /* getopt_long */ #endif +#include "config.h" + #include <sys/types.h> #include <sys/stat.h> @@ -38,6 +40,10 @@ #include <strings.h> #include <unistd.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "common.h" @@ -138,7 +144,7 @@ WMPropList *PixmapPath = NULL; char *ThemePath = NULL; -static void print_help(int print_usage, int exitval) +static noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [-t] [-p] [-h] [-v] [file]\n", __progname); if (print_usage) { diff --git a/util/seticons.c b/util/seticons.c index b64d168..bf741fd 100644 --- a/util/seticons.c +++ b/util/seticons.c @@ -23,18 +23,24 @@ #define _GNU_SOURCE /* getopt_long */ #endif +#include "config.h" + #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "../src/wconfig.h" extern char *__progname; -static void print_help(int print_usage, int exitval) +static noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [-h] [-v] [file]\n", __progname); if (print_usage) { diff --git a/util/setstyle.c b/util/setstyle.c index 80b9e1d..451589c 100644 --- a/util/setstyle.c +++ b/util/setstyle.c @@ -23,6 +23,8 @@ #define _GNU_SOURCE /* getopt_long */ #endif +#include "config.h" + #include <sys/stat.h> #include <getopt.h> @@ -34,6 +36,10 @@ #include <unistd.h> #include <X11/Xlib.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "../src/wconfig.h" @@ -350,7 +356,7 @@ static void hackStyle(WMPropList * style) } } -static void print_help(int print_usage, int exitval) +static noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [OPTIONS] FILE\n", __progname); if (print_usage) { diff --git a/util/wdread.c b/util/wdread.c index 832b1f6..a227817 100644 --- a/util/wdread.c +++ b/util/wdread.c @@ -27,6 +27,7 @@ /* * WindowMaker defaults DB reader */ +#include "config.h" #include <getopt.h> #include <limits.h> @@ -35,13 +36,17 @@ #include <string.h> #include <unistd.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "../src/wconfig.h" extern char *__progname; -static void print_help(int print_usage, int exitval) +static noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [OPTIONS] <domain> <key>\n", __progname); if (print_usage) { diff --git a/util/wdwrite.c b/util/wdwrite.c index a2bb61f..3578d07 100644 --- a/util/wdwrite.c +++ b/util/wdwrite.c @@ -26,7 +26,7 @@ /* * WindowMaker defaults DB writer */ - +#include "config.h" #include <getopt.h> #include <limits.h> @@ -35,13 +35,17 @@ #include <string.h> #include <unistd.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "../src/wconfig.h" extern char *__progname; -static void print_help(int print_usage, int exitval) +static noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [OPTIONS] <domain> <key> <value>\n", __progname); if (print_usage) { diff --git a/util/wmgenmenu.c b/util/wmgenmenu.c index 0dc5810..b043feb 100644 --- a/util/wmgenmenu.c +++ b/util/wmgenmenu.c @@ -4,6 +4,8 @@ #define _GNU_SOURCE /* getopt_long */ #endif +#include "config.h" + #include <ctype.h> #include <getopt.h> #include <limits.h> @@ -12,6 +14,10 @@ #include <stdlib.h> #include <string.h> +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include <WINGs/WUtil.h> #include "../src/wconfig.h" @@ -477,7 +483,7 @@ static void other_window_managers(void) WMAddToPLArray(RMenu, L1Menu); } -void print_help(int print_usage, int exitval) +noreturn void print_help(int print_usage, int exitval) { printf("Usage: %s [-h] [-v]\n", __progname); if (print_usage) { diff --git a/util/wmsetbg.c b/util/wmsetbg.c index ead3229..22653af 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -24,6 +24,8 @@ /* * TODO: rewrite, too dirty */ +#include "config.h" + #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -37,8 +39,6 @@ #include <sys/types.h> #include <ctype.h> -#include "../config.h" - #ifdef XINERAMA # ifdef SOLARIS_XINERAMA /* sucks */ # include <X11/extensions/xinerama.h> @@ -47,6 +47,10 @@ # endif #endif +#ifdef HAVE_STDNORETURN +#include <stdnoreturn.h> +#endif + #include "../src/wconfig.h" #ifndef GLOBAL_DEFAULTS_SUBDIR @@ -880,7 +884,7 @@ static int readmsg(int fd, char *buffer, int size) * n is 4 bytes * size = 4 bytes for length of the message data */ -static void helperLoop(RContext * rc) +static noreturn void helperLoop(RContext * rc) { BackgroundTexture *textures[WORKSPACE_COUNT]; int maxTextures = 0; -- 1.8.4.rc3 -- To unsubscribe, send mail to [email protected].
