From 9b353202a5aa2ae05d5bff63aa1528621db2a01f Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Fri, 19 Oct 2018 10:33:50 +0200 Subject: [PATCH] fix [x11]: compiler warnings in floatbar client/X11/xf_floatbar.c:530:27: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] if (event->xmotion.state && Button1Mask && mode > XF_FLOATBAR_MODE_DRAGGING) ^ ~~~~~~~~~~~ client/X11/xf_floatbar.c:534:32: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] else if (event->xmotion.state && Button1Mask && mode == XF_FLOATBAR_MODE_DRAGGING) ^ ~~~~~~~~~~~ clang 8.0.0-svn344413-1~exp1+0~20181012203207.819~1.gbpc91f27 --- client/X11/xf_floatbar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/X11/xf_floatbar.c b/client/X11/xf_floatbar.c index dceb08a..1d60072 100644 --- a/client/X11/xf_floatbar.c +++ b/client/X11/xf_floatbar.c @@ -527,11 +527,11 @@ static void xf_floatbar_event_motionnotify(xfContext* xfc, XEvent* event) floatbar = xfc->window->floatbar; cursor = XCreateFontCursor(xfc->display, XC_arrow); - if (event->xmotion.state && Button1Mask && mode > XF_FLOATBAR_MODE_DRAGGING) + if ((event->xmotion.state & Button1Mask) && (mode > XF_FLOATBAR_MODE_DRAGGING)) { xf_floatbar_resize(xfc, event); } - else if (event->xmotion.state && Button1Mask && mode == XF_FLOATBAR_MODE_DRAGGING) + else if ((event->xmotion.state & Button1Mask) && (mode == XF_FLOATBAR_MODE_DRAGGING)) { xf_floatbar_dragging(xfc, event); } -- 2.7.4