diff --git a/WINGs/dragdestination.c b/WINGs/dragdestination.c index 0f1849fc..74f0d8e4 100644 --- a/WINGs/dragdestination.c +++ b/WINGs/dragdestination.c @@ -311,13 +311,13 @@ void W_DragDestinationStoreEnterMsgInfo(WMDraggingInfo * info, WMView * toplevel XDND_AWARE_VIEW(info) = toplevel; updateSourceWindow(info, event); -/* +#if 0 if (event->data.l[1] & 1) /* 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 XDND_SOURCE_TYPES(info) = getTypesFromThreeTypes(scr, event); -*/ +#endif XDND_SOURCE_TYPES(info) = getTypesFromThreeTypes(scr, event); /* to use if the 3 types are not enough */ diff --git a/WINGs/wfilepanel.c b/WINGs/wfilepanel.c index 5a8aa2cd..660ce34d 100644 --- a/WINGs/wfilepanel.c +++ b/WINGs/wfilepanel.c @@ -662,7 +662,7 @@ static void normalizePath(char *s) int i, j, found; found = 0; - for (i = 0; s[i]; !found && i++) { + for (i = 0; s[i]; (void)(!found && i++)) { found = 0; if (s[i] == '/' && s[i+1] == '/') { int nslash = 1; diff --git a/WINGs/wtabview.c b/WINGs/wtabview.c index df72d481..b4ec670c 100644 --- a/WINGs/wtabview.c +++ b/WINGs/wtabview.c @@ -93,7 +93,7 @@ static int positionOfTab(WMTabView * tabView, int tab) int i; int offs; - if (tab < tabView->firstVisible) + if (tab < 0 || tab < tabView->firstVisible) return -1; if (tab > tabView->firstVisible + tabView->visibleTabs) diff --git a/src/actions.c b/src/actions.c index d9aeb775..eb46f3f1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1225,10 +1225,8 @@ void wHideAll(WScreen *scr) { WWindow *wwin; WWindow **windows; - Window FocusedWin; WMenu *menu; unsigned int wcount = 0; - int FocusState; int i; if (!scr) diff --git a/src/event.c b/src/event.c index 198619ef..57197b71 100644 --- a/src/event.c +++ b/src/event.c @@ -914,7 +914,6 @@ static void handlePropertyNotify(XEvent * event) Window jr; int ji; unsigned int ju; - WScreen *scr; wwin = wWindowFor(event->xproperty.window); if (wwin) { @@ -927,8 +926,6 @@ static void handlePropertyNotify(XEvent * event) if (wapp) { wClientCheckProperty(wapp->main_window_desc, &event->xproperty); } - - scr = wScreenForWindow(event->xproperty.window); } static void handleClientMessage(XEvent * event) diff --git a/src/startup.c b/src/startup.c index 0d83db35..149147c6 100644 --- a/src/startup.c +++ b/src/startup.c @@ -508,7 +508,10 @@ static char *atomNames[] = { void StartUp(Bool defaultScreenOnly) { struct sigaction sig_action; - int j, max, dummy; + int j, max; +#ifdef HAVE_XRANDR + int dummy; +#endif Atom atom[sizeof(atomNames) / sizeof(char *)]; /* diff --git a/wrlib/scale.c b/wrlib/scale.c index d5111bf2..82ed57e8 100644 --- a/wrlib/scale.c +++ b/wrlib/scale.c @@ -55,8 +55,6 @@ RImage *RScaleImage(RImage * image, unsigned new_width, unsigned new_height) unsigned char *d; RImage *img; - assert(new_width >= 0 && new_height >= 0); - if (new_width == image->width && new_height == image->height) return RCloneImage(image);