Not so nice, thanks Rodolfo. I recreated the patch I enclosed here to remove the 'dx' from getResizeDirection() function as it's called only once and it's static fct.
Carlos, sorry for that could you please amend commit ref below with the new patch enclosed ? commit cc0063e7826880d85a5b5473d6be5b9ae75908a7 Author: David Maciejak <[email protected]> Date: Thu Aug 14 11:59:48 2014 +0700 Here the code: diff --git a/src/moveres.c b/src/moveres.c index 3d707d7..c88875b 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -1798,7 +1798,7 @@ int wMouseMoveWindow(WWindow * wwin, XEvent * ev) #define RESIZEBAR 1 #define HCONSTRAIN 2 -static int getResizeDirection(WWindow * wwin, int x, int y, int dx, int dy, int flags) +static int getResizeDirection(WWindow * wwin, int x, int y, int dy, int flags) { int w = wwin->frame->core->width - 1; int cw = wwin->frame->resizebar_corner_width; @@ -1980,9 +1980,7 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev) || abs(orig_y - event.xmotion.y_root) < HRESIZE_THRESHOLD)) flags |= HCONSTRAIN; - res = getResizeDirection(wwin, tx, ty, - orig_x - event.xmotion.x_root, - orig_y - event.xmotion.y_root, flags); + res = getResizeDirection(wwin, tx, ty, orig_y - event.xmotion.y_root, flags); if (res == (UP | LEFT)) XChangeActivePointerGrab(dpy, ButtonMotionMask -- thanks, david On Fri, Aug 15, 2014 at 12:37 AM, Rodolfo García Peñas <[email protected]> wrote: > Hi David, > > Nice patch. Probably is a good idea remove the dx variable in the function > getResizeDirection() too, to avoid this compiler warning: > > gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/lib/locale\" > -I../wrlib -I../WINGs -I/usr/local/include -DNDEBUG -D_XOPEN_SOURCE=600 > -D_GNU_SOURCE -g -O2 -std=c11 -Wall -Wextra -Wno-sign-compare > -Wno-deprecated -Wno-deprecated-declarations -MT moveres.o -MD -MP -MF > .deps/moveres.Tpo -c -o moveres.o moveres.c > moveres.c: In function ‘getResizeDirection’: > moveres.c:1801:65: warning: unused parameter ‘dx’ [-Wunused-parameter] > static int getResizeDirection(WWindow * wwin, int x, int y, int dx, int dy, > int flags) > > Cheers, > kix > > On Thu, 14 Aug 2014, David Maciejak escribió: > >> This patch is fixing compilation issue as variable 'dx' >> is not used in getResizeDirection function >> --- >> src/moveres.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/src/moveres.c b/src/moveres.c >> index 3d707d7..6645b22 100644 >> --- a/src/moveres.c >> +++ b/src/moveres.c >> @@ -1803,6 +1803,7 @@ static int getResizeDirection(WWindow * wwin, >> int x, int y, int dx, int dy, int >> int w = wwin->frame->core->width - 1; >> int cw = wwin->frame->resizebar_corner_width; >> int dir; >> + (void) dx; >> >> /* if not resizing through the resizebar */ >> if (!(flags & RESIZEBAR)) { >> -- > >
0001-wmaker-fix-moveres.c-compilation-warning.patch
Description: Binary data
