mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
util: Added noreturn attribute to appropriate functions
clang is a bit more strict on the attribute usage, so let's comply. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
7491f5479b
commit
f8b6871371
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user