From 8a58c8b56844ddc9601bb1b578798f23797ea6d8 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 12 May 2013 00:24:49 +0200 Subject: [PATCH] WINGs: Moved declaration of extern variable to the global header Having local extern declaration is dangerous because the compiler is not able to cross-check if the type of the variable was defined consistently. --- WINGs/WINGs/WINGsP.h | 2 ++ WINGs/error.c | 2 +- WINGs/wappresource.c | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WINGs/WINGs/WINGsP.h b/WINGs/WINGs/WINGsP.h index 47287ae1..87765c1d 100644 --- a/WINGs/WINGs/WINGsP.h +++ b/WINGs/WINGs/WINGsP.h @@ -40,7 +40,9 @@ typedef struct _WINGsConfiguration { unsigned mouseWheelDown; } _WINGsConfiguration; +extern char *_WINGS_progname; extern _WINGsConfiguration WINGsConfiguration; +extern struct W_Application WMApplication; /* ---[ drag*.c ]--------------------------------------------------------- */ diff --git a/WINGs/error.c b/WINGs/error.c index 1c38daae..2d5a5881 100644 --- a/WINGs/error.c +++ b/WINGs/error.c @@ -28,8 +28,8 @@ #include #include +#include -extern char *_WINGS_progname; void __wmessage(const char *func, const char *file, int line, int type, const char *msg, ...) { diff --git a/WINGs/wappresource.c b/WINGs/wappresource.c index 10e0ec4f..013049c0 100644 --- a/WINGs/wappresource.c +++ b/WINGs/wappresource.c @@ -7,7 +7,6 @@ #include "GNUstep.h" -extern struct W_Application WMApplication; void WMSetApplicationIconWindow(WMScreen * scr, Window window) { -- 2.11.4.GIT