mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Fix some warnings
Non-obvious fixes: WINGs/wfilepanel.c: Cast to void to avoid an unused calculated value warning. WINGs/wtabview.c: Test tab<0 to avoid a warning from the next condition about signed overflow in an inlined invocation of the function. Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
This commit is contained in:
committed by
Carlos R. Mafra
parent
51134d2438
commit
5eebb8bc3c
@@ -311,13 +311,13 @@ void W_DragDestinationStoreEnterMsgInfo(WMDraggingInfo * info, WMView * toplevel
|
|||||||
XDND_AWARE_VIEW(info) = toplevel;
|
XDND_AWARE_VIEW(info) = toplevel;
|
||||||
updateSourceWindow(info, event);
|
updateSourceWindow(info, event);
|
||||||
|
|
||||||
/*
|
#if 0
|
||||||
if (event->data.l[1] & 1)
|
if (event->data.l[1] & 1)
|
||||||
/* XdndTypeList property is available */
|
/* XdndTypeList property is available */
|
||||||
/* XDND_SOURCE_TYPES(info) = getTypesFromTypeList(scr, XDND_SOURCE_WIN(info));
|
XDND_SOURCE_TYPES(info) = getTypesFromTypeList(scr, XDND_SOURCE_WIN(info));
|
||||||
else
|
else
|
||||||
XDND_SOURCE_TYPES(info) = getTypesFromThreeTypes(scr, event);
|
XDND_SOURCE_TYPES(info) = getTypesFromThreeTypes(scr, event);
|
||||||
*/
|
#endif
|
||||||
XDND_SOURCE_TYPES(info) = getTypesFromThreeTypes(scr, event);
|
XDND_SOURCE_TYPES(info) = getTypesFromThreeTypes(scr, event);
|
||||||
|
|
||||||
/* to use if the 3 types are not enough */
|
/* to use if the 3 types are not enough */
|
||||||
|
|||||||
@@ -662,7 +662,7 @@ static void normalizePath(char *s)
|
|||||||
int i, j, found;
|
int i, j, found;
|
||||||
|
|
||||||
found = 0;
|
found = 0;
|
||||||
for (i = 0; s[i]; !found && i++) {
|
for (i = 0; s[i]; (void)(!found && i++)) {
|
||||||
found = 0;
|
found = 0;
|
||||||
if (s[i] == '/' && s[i+1] == '/') {
|
if (s[i] == '/' && s[i+1] == '/') {
|
||||||
int nslash = 1;
|
int nslash = 1;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ static int positionOfTab(WMTabView * tabView, int tab)
|
|||||||
int i;
|
int i;
|
||||||
int offs;
|
int offs;
|
||||||
|
|
||||||
if (tab < tabView->firstVisible)
|
if (tab < 0 || tab < tabView->firstVisible)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (tab > tabView->firstVisible + tabView->visibleTabs)
|
if (tab > tabView->firstVisible + tabView->visibleTabs)
|
||||||
|
|||||||
@@ -1225,10 +1225,8 @@ void wHideAll(WScreen *scr)
|
|||||||
{
|
{
|
||||||
WWindow *wwin;
|
WWindow *wwin;
|
||||||
WWindow **windows;
|
WWindow **windows;
|
||||||
Window FocusedWin;
|
|
||||||
WMenu *menu;
|
WMenu *menu;
|
||||||
unsigned int wcount = 0;
|
unsigned int wcount = 0;
|
||||||
int FocusState;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!scr)
|
if (!scr)
|
||||||
|
|||||||
@@ -914,7 +914,6 @@ static void handlePropertyNotify(XEvent * event)
|
|||||||
Window jr;
|
Window jr;
|
||||||
int ji;
|
int ji;
|
||||||
unsigned int ju;
|
unsigned int ju;
|
||||||
WScreen *scr;
|
|
||||||
|
|
||||||
wwin = wWindowFor(event->xproperty.window);
|
wwin = wWindowFor(event->xproperty.window);
|
||||||
if (wwin) {
|
if (wwin) {
|
||||||
@@ -927,8 +926,6 @@ static void handlePropertyNotify(XEvent * event)
|
|||||||
if (wapp) {
|
if (wapp) {
|
||||||
wClientCheckProperty(wapp->main_window_desc, &event->xproperty);
|
wClientCheckProperty(wapp->main_window_desc, &event->xproperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
scr = wScreenForWindow(event->xproperty.window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleClientMessage(XEvent * event)
|
static void handleClientMessage(XEvent * event)
|
||||||
|
|||||||
@@ -508,7 +508,10 @@ static char *atomNames[] = {
|
|||||||
void StartUp(Bool defaultScreenOnly)
|
void StartUp(Bool defaultScreenOnly)
|
||||||
{
|
{
|
||||||
struct sigaction sig_action;
|
struct sigaction sig_action;
|
||||||
int j, max, dummy;
|
int j, max;
|
||||||
|
#ifdef HAVE_XRANDR
|
||||||
|
int dummy;
|
||||||
|
#endif
|
||||||
Atom atom[sizeof(atomNames) / sizeof(char *)];
|
Atom atom[sizeof(atomNames) / sizeof(char *)];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ RImage *RScaleImage(RImage * image, unsigned new_width, unsigned new_height)
|
|||||||
unsigned char *d;
|
unsigned char *d;
|
||||||
RImage *img;
|
RImage *img;
|
||||||
|
|
||||||
assert(new_width >= 0 && new_height >= 0);
|
|
||||||
|
|
||||||
if (new_width == image->width && new_height == image->height)
|
if (new_width == image->width && new_height == image->height)
|
||||||
return RCloneImage(image);
|
return RCloneImage(image);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user