From 51dde0252e7f1cd101ab2855bb7f4204b418a39e Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 19 Apr 2016 17:27:12 +0200 Subject: [PATCH] Fixed error=parentheses warning --- examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp b/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp index 732b564a..7fa145ad 100644 --- a/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp +++ b/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp @@ -43,11 +43,12 @@ void JoystickReportParser::Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8 for (uint8_t i = 0; i < 0x0C; i++) { uint16_t mask = (0x0001 << i); - if (((mask & changes) > 0) && joyEvents) + if (((mask & changes) > 0) && joyEvents) { if ((buttons & mask) > 0) joyEvents->OnButtonDn(i + 1); else joyEvents->OnButtonUp(i + 1); + } } oldButtons = buttons; }