1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Fix trivial warnings

* Format string integer size warnings
 * Missing or non-value returns in non-void functions
 * A missing #include in WPrefs.app/MouseSettings.c
This commit is contained in:
Brad Jorsch
2010-04-08 14:43:49 -04:00
committed by Carlos R. Mafra
parent 6b5cfc887a
commit 6082f2d243
6 changed files with 16 additions and 14 deletions

View File

@@ -135,7 +135,7 @@ W_SendDnDClientMessage(Display * dpy, Window win, Atom message,
#endif
if (!windowExists(dpy, win)) {
wwarning("xdnd message target %d does no longer exist.", win);
wwarning("xdnd message target %lu does no longer exist.", win);
return False; /* message not sent */
}

View File

@@ -1746,4 +1746,5 @@ int wrmdirhier(const char *path)
}
return 1;
}

View File

@@ -25,6 +25,7 @@
#include <X11/Xutil.h>
#include <unistd.h>
#include <math.h>
/* double-click tester */

View File

@@ -96,11 +96,11 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
char rtext[300];
if (strlen(slist[*index]) > 300) {
wwarning("appmenu: menu command size exceeded in window %x", win);
wwarning("appmenu: menu command size exceeded in window %lx", win);
return NULL;
}
if (sscanf(slist[*index], "%i %i %n", &command, &code, &pos) < 2 || command != wmBeginMenu) {
wwarning("appmenu: bad menu entry \"%s\" in window %x", slist[*index], win);
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
return NULL;
}
strcpy(title, &slist[*index][pos]);
@@ -113,7 +113,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
if (sscanf(slist[*index], "%i", &command) != 1) {
wMenuDestroy(menu, True);
wwarning("appmenu: bad menu entry \"%s\" in window %x", slist[*index], win);
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
return NULL;
}
@@ -129,7 +129,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
if (sscanf(slist[*index], "%i %i %i %i %n",
&command, &ecode, &etag, &enab, &pos) != 4 || ecode != code) {
wMenuDestroy(menu, True);
wwarning("appmenu: bad menu entry \"%s\" in window %x",
wwarning("appmenu: bad menu entry \"%s\" in window %lx",
slist[*index], win);
return NULL;
}
@@ -139,14 +139,14 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
if (sscanf(slist[*index], "%i %i %i %i %s %n",
&command, &ecode, &etag, &enab, rtext, &pos) != 5 || ecode != code) {
wMenuDestroy(menu, True);
wwarning("appmenu: bad menu entry \"%s\" in window %x",
wwarning("appmenu: bad menu entry \"%s\" in window %lx",
slist[*index], win);
return NULL;
}
strcpy(title, &slist[*index][pos]);
}
if (!(data = malloc(sizeof(WAppMenuData)))) {
wwarning("appmenu: out of memory making menu for window %x", win);
wwarning("appmenu: out of memory making menu for window %lx", win);
wMenuDestroy(menu, True);
return NULL;
}
@@ -156,7 +156,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
entry = wMenuAddCallback(menu, title, notifyClient, data);
if (!entry) {
wMenuDestroy(menu, True);
wwarning("appmenu: out of memory creating menu for window %x", slist[*index], win);
wwarning("appmenu: out of memory creating menu for window %lx", win);
wfree(data);
return NULL;
}
@@ -175,7 +175,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
if (sscanf(slist[*index], "%i %i %i %i %i %n",
&command, &ecode, &etag, &enab, &ncode, &pos) != 5 || ecode != code) {
wMenuDestroy(menu, True);
wwarning("appmenu: bad menu entry \"%s\" in window %x", slist[*index], win);
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
return NULL;
}
@@ -189,7 +189,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
if (!entry) {
wMenuDestroy(menu, True);
wMenuDestroy(submenu, True);
wwarning("appmenu: out of memory creating menu for window %x", slist[*index], win);
wwarning("appmenu: out of memory creating menu for window %lx", win);
return NULL;
}
@@ -197,7 +197,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
} else {
wMenuDestroy(menu, True);
wwarning("appmenu: bad menu entry \"%s\" in window %x", slist[*index], win);
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
return NULL;
}
}
@@ -221,7 +221,7 @@ WMenu *wAppMenuGet(WScreen * scr, Window window)
}
XFree(text_prop.value);
if (strcmp(slist[0], "WMMenu 0") != 0) {
wwarning("appmenu: unknown version of WMMenu in window %x: %s", window, slist[0]);
wwarning("appmenu: unknown version of WMMenu in window %lx: %s", window, slist[0]);
XFreeStringList(slist);
return NULL;
}

View File

@@ -3514,7 +3514,7 @@ static Bool handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
Bool hasMoved = False;
if (wPreferences.flags.noupdates)
return;
return hasMoved;
if (XGrabPointer(dpy, icon->core->window, True, ButtonMotionMask
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync,

View File

@@ -1212,7 +1212,7 @@ static WMenu *readMenuPipe(WScreen * scr, char **file_name)
separateline(line, title, command, params, shortcut);
if (!command[0]) {
wwarning(_("%s:missing command in menu config: %s"), file_name, line);
wwarning(_("%s:missing command in menu config: %s"), filename, line);
break;
}
if (strcasecmp(command, "MENU") == 0) {