From 445b3fbf826dd074b1f2a34cddcd3f126462f0d1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 2 Mar 2015 19:09:25 +0100 Subject: buid: readd -Wparentheses This warning wasn't overly helpful in the past, and warned against perfectly fine code. But at least with recent gcc versions, this is the warning that complains about assignments in if expressions (why???), so we want to enable it. Also change all the code this warning complains about for no reason. --- video/out/wayland_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out/wayland_common.c') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 2d09ad12b0..224a60d1e0 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -418,7 +418,7 @@ static void pointer_handle_button(void *data, { struct vo_wayland_state *wl = data; - mp_input_put_key(wl->vo->input_ctx, MP_MOUSE_BTN0 + (button - BTN_LEFT) | + mp_input_put_key(wl->vo->input_ctx, (MP_MOUSE_BTN0 + (button - BTN_LEFT)) | ((state == WL_POINTER_BUTTON_STATE_PRESSED) ? MP_KEY_STATE_DOWN : MP_KEY_STATE_UP)); -- cgit v1.2.3