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:
committed by
Carlos R. Mafra
parent
6b5cfc887a
commit
6082f2d243
@@ -135,7 +135,7 @@ W_SendDnDClientMessage(Display * dpy, Window win, Atom message,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!windowExists(dpy, win)) {
|
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 */
|
return False; /* message not sent */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1746,4 +1746,5 @@ int wrmdirhier(const char *path)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
/* double-click tester */
|
/* double-click tester */
|
||||||
|
|||||||
@@ -96,11 +96,11 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
|||||||
char rtext[300];
|
char rtext[300];
|
||||||
|
|
||||||
if (strlen(slist[*index]) > 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (sscanf(slist[*index], "%i %i %n", &command, &code, &pos) < 2 || command != wmBeginMenu) {
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
strcpy(title, &slist[*index][pos]);
|
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) {
|
if (sscanf(slist[*index], "%i", &command) != 1) {
|
||||||
wMenuDestroy(menu, True);
|
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;
|
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",
|
if (sscanf(slist[*index], "%i %i %i %i %n",
|
||||||
&command, &ecode, &etag, &enab, &pos) != 4 || ecode != code) {
|
&command, &ecode, &etag, &enab, &pos) != 4 || ecode != code) {
|
||||||
wMenuDestroy(menu, True);
|
wMenuDestroy(menu, True);
|
||||||
wwarning("appmenu: bad menu entry \"%s\" in window %x",
|
wwarning("appmenu: bad menu entry \"%s\" in window %lx",
|
||||||
slist[*index], win);
|
slist[*index], win);
|
||||||
return NULL;
|
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",
|
if (sscanf(slist[*index], "%i %i %i %i %s %n",
|
||||||
&command, &ecode, &etag, &enab, rtext, &pos) != 5 || ecode != code) {
|
&command, &ecode, &etag, &enab, rtext, &pos) != 5 || ecode != code) {
|
||||||
wMenuDestroy(menu, True);
|
wMenuDestroy(menu, True);
|
||||||
wwarning("appmenu: bad menu entry \"%s\" in window %x",
|
wwarning("appmenu: bad menu entry \"%s\" in window %lx",
|
||||||
slist[*index], win);
|
slist[*index], win);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
strcpy(title, &slist[*index][pos]);
|
strcpy(title, &slist[*index][pos]);
|
||||||
}
|
}
|
||||||
if (!(data = malloc(sizeof(WAppMenuData)))) {
|
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);
|
wMenuDestroy(menu, True);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -156,7 +156,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
|||||||
entry = wMenuAddCallback(menu, title, notifyClient, data);
|
entry = wMenuAddCallback(menu, title, notifyClient, data);
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
wMenuDestroy(menu, True);
|
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);
|
wfree(data);
|
||||||
return NULL;
|
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",
|
if (sscanf(slist[*index], "%i %i %i %i %i %n",
|
||||||
&command, &ecode, &etag, &enab, &ncode, &pos) != 5 || ecode != code) {
|
&command, &ecode, &etag, &enab, &ncode, &pos) != 5 || ecode != code) {
|
||||||
wMenuDestroy(menu, True);
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -189,7 +189,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
|||||||
if (!entry) {
|
if (!entry) {
|
||||||
wMenuDestroy(menu, True);
|
wMenuDestroy(menu, True);
|
||||||
wMenuDestroy(submenu, 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
wMenuDestroy(menu, True);
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ WMenu *wAppMenuGet(WScreen * scr, Window window)
|
|||||||
}
|
}
|
||||||
XFree(text_prop.value);
|
XFree(text_prop.value);
|
||||||
if (strcmp(slist[0], "WMMenu 0") != 0) {
|
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);
|
XFreeStringList(slist);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3514,7 +3514,7 @@ static Bool handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
|||||||
Bool hasMoved = False;
|
Bool hasMoved = False;
|
||||||
|
|
||||||
if (wPreferences.flags.noupdates)
|
if (wPreferences.flags.noupdates)
|
||||||
return;
|
return hasMoved;
|
||||||
|
|
||||||
if (XGrabPointer(dpy, icon->core->window, True, ButtonMotionMask
|
if (XGrabPointer(dpy, icon->core->window, True, ButtonMotionMask
|
||||||
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync,
|
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync,
|
||||||
|
|||||||
@@ -1212,7 +1212,7 @@ static WMenu *readMenuPipe(WScreen * scr, char **file_name)
|
|||||||
separateline(line, title, command, params, shortcut);
|
separateline(line, title, command, params, shortcut);
|
||||||
|
|
||||||
if (!command[0]) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
if (strcasecmp(command, "MENU") == 0) {
|
if (strcasecmp(command, "MENU") == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user