Plain integer as NULL pointer, non-ANSI function declaration etc.
---
 src/actions.c     |    2 +-
 src/appmenu.c     |    2 +-
 src/dialog.c      |    2 +-
 src/dock.c        |    2 +-
 src/misc.c        |    4 ++--
 src/screen.c      |    2 +-
 src/superfluous.h |    9 +++------
 src/window.c      |    6 +++---
 src/window.h      |    2 +-
 src/wmspec.c      |   12 ++++++------
 src/wmspec.h      |    4 ++--
 11 files changed, 22 insertions(+), 25 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index 65ebc0b..16e1267 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -815,7 +815,7 @@ void animateResize(WScreen *scr, int x, int y, int w, int 
h, int fx, int fy, int
 }
 #endif                         /* ANIMATIONS */
 
-static void flushExpose()
+static void flushExpose(void)
 {
        XEvent tmpev;
 
diff --git a/src/appmenu.c b/src/appmenu.c
index 5778cab..2f001b4 100644
--- a/src/appmenu.c
+++ b/src/appmenu.c
@@ -35,7 +35,7 @@
 #include "menu.h"
 #include "actions.h"
 #include "funcs.h"
-
+#include "appmenu.h"
 #include "framewin.h"
 
 /******** Global Variables **********/
diff --git a/src/dialog.c b/src/dialog.c
index 6ee0703..a08fc6b 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -104,7 +104,7 @@ int wMessageDialog(WScreen * scr, char *title, char 
*message, char *defBtn, char
        return result;
 }
 
-void toggleSaveSession(WMWidget * w, void *data)
+static void toggleSaveSession(WMWidget *w, void *data)
 {
        wPreferences.save_session_on_exit = WMGetButtonSelected((WMButton *) w);
 }
diff --git a/src/dock.c b/src/dock.c
index e4a6022..4fb830b 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -129,7 +129,7 @@ static void clipAutoRaise(void *cdata);
 
 static void showClipBalloon(WDock * dock, int workspace);
 
-static void make_keys()
+static void make_keys(void)
 {
        if (dCommand != NULL)
                return;
diff --git a/src/misc.c b/src/misc.c
index b881053..0a2de1c 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -72,7 +72,7 @@ static void putidef(char *line, char *name, int value)
        strcat(line, tmp);
 }
 
-static char *username()
+static char *username(void)
 {
        char *tmp;
 
@@ -235,7 +235,7 @@ Bool wGetIconName(Display *dpy, Window win, char **iconname)
        return False;
 }
 
-static void eatExpose()
+static void eatExpose(void)
 {
        XEvent event, foo;
 
diff --git a/src/screen.c b/src/screen.c
index 884e4f2..1a119c2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -92,7 +92,7 @@ static WMPropList *dWorkspace;
 static WMPropList *dDock;
 static WMPropList *dClip;
 
-static void make_keys()
+static void make_keys(void)
 {
        if (dApplications != NULL)
                return;
diff --git a/src/superfluous.h b/src/superfluous.h
index 99b087b..8c9135a 100644
--- a/src/superfluous.h
+++ b/src/superfluous.h
@@ -21,9 +21,6 @@
 
 #define PIECES ((64/ICON_KABOOM_PIECE_SIZE)*(64/ICON_KABOOM_PIECE_SIZE))
 
-
-
-
-extern void DoKaboom();
-extern Pixmap MakeGhostDock();
-extern Pixmap MakeGhostIcon();
+extern void DoKaboom(WScreen *scr, Window win, int x, int y);
+extern Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y);
+extern Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable);
diff --git a/src/window.c b/src/window.c
index 8863275..cd3a0d4 100644
--- a/src/window.c
+++ b/src/window.c
@@ -165,7 +165,7 @@ WWindow *wWindowFor(Window window)
        return NULL;
 }
 
-WWindow *wWindowCreate()
+WWindow *wWindowCreate(void)
 {
        WWindow *wwin;
 
@@ -675,7 +675,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
        XSetWindowBorderWidth(dpy, window, 0);
 
        /* get hints from GNUstep app */
-       if (wwin->wm_class != 0 && strcmp(wwin->wm_class, "GNUstep") == 0) {
+       if (wwin->wm_class != NULL && strcmp(wwin->wm_class, "GNUstep") == 0) {
                wwin->flags.is_gnustep = 1;
        }
        if (!PropGetGNUstepWMAttr(window, &wwin->wm_gnustep_attr)) {
@@ -2571,7 +2571,7 @@ WMagicNumber wWindowAddSavedState(char *instance, char 
*class, char *command, pi
 
        wstate = malloc(sizeof(WWindowState));
        if (!wstate)
-               return 0;
+               return NULL;
 
        memset(wstate, 0, sizeof(WWindowState));
        wstate->pid = pid;
diff --git a/src/window.h b/src/window.h
index 12834c3..867e222 100644
--- a/src/window.h
+++ b/src/window.h
@@ -355,7 +355,7 @@ typedef void* WMagicNumber;
 
 
 void wWindowDestroy(WWindow *wwin);
-WWindow *wWindowCreate();
+WWindow *wWindowCreate(void);
 
 #ifdef SHAPE
 void wWindowSetShape(WWindow *wwin);
diff --git a/src/wmspec.c b/src/wmspec.c
index 1ffe955..a926d54 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -874,7 +874,7 @@ static Bool updateStrut(WWindow * wwin, Bool adding)
                int fmt_ret;
                unsigned long nitems_ret;
                unsigned long bytes_after_ret;
-               long *data = 0;
+               long *data = NULL;
 
                if (XGetWindowProperty(dpy, wwin->client_win, net_wm_strut, 0, 
4, False,
                                       XA_CARDINAL, &type_ret, &fmt_ret, 
&nitems_ret,
@@ -1177,7 +1177,7 @@ static void updateWindowType(WWindow * wwin)
        int fmt_ret;
        unsigned long nitems_ret;
        unsigned long bytes_after_ret;
-       long *data = 0;
+       long *data = NULL;
        int layer;
        if (XGetWindowProperty(dpy, wwin->client_win, net_wm_window_type, 0, 1,
                               False, XA_ATOM, &type_ret, &fmt_ret, &nitems_ret,
@@ -1207,7 +1207,7 @@ Bool wNETWMCheckClientHints(WWindow * wwin, int *layer, 
int *workspace)
        int fmt_ret;
        unsigned long nitems_ret;
        unsigned long bytes_after_ret;
-       long *data = 0;
+       long *data = NULL;
        Bool hasState = False;
        int i;
 
@@ -1268,7 +1268,7 @@ static Bool updateNetIconInfo(WWindow * wwin)
        int fmt_ret;
        unsigned long nitems_ret;
        unsigned long bytes_after_ret;
-       long *data = 0;
+       long *data = NULL;
        Bool hasState = False;
        Bool old_state = wwin->flags.net_handle_icon;
 
@@ -1348,7 +1348,7 @@ static void handleDesktopNames(XClientMessageEvent * 
event, WScreen * scr)
                return;
        }
 
-       if (data == 0)
+       if (data == NULL)
                return;
 
        if (type_ret != utf8_string || fmt_ret != 8)
@@ -1516,7 +1516,7 @@ int wNETWMGetPidForWindow(Window window)
        int fmt_ret;
        unsigned long nitems_ret;
        unsigned long bytes_after_ret;
-       long *data = 0;
+       long *data = NULL;
        int pid;
 
        if (XGetWindowProperty(dpy, window, net_wm_pid, 0, 1, False,
diff --git a/src/wmspec.h b/src/wmspec.h
index 978950a..d498cf2 100644
--- a/src/wmspec.h
+++ b/src/wmspec.h
@@ -25,8 +25,8 @@
 #ifndef _WMSPEC_H_
 #define _WMSPEC_H_
 
-#include <screen.h>
-#include <window.h>
+#include "screen.h"
+#include "window.h"
 #include <X11/Xlib.h>
 
 void wNETWMInitStuff(WScreen *scr);
-- 
1.7.1.rc0.13.g7ec1e


-- 
To unsubscribe, send mail to [email protected].

Reply via email to