From 7387db0673ba7f94057b8b05de17ba05a65f320a Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Sat, 3 Mar 2012 13:26:57 -0500 Subject: [PATCH] fixed minor compilation warnings for Leonardo --- hardware/arduino/cores/arduino/HID.cpp | 3 +-- hardware/arduino/cores/arduino/USBAPI.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hardware/arduino/cores/arduino/HID.cpp b/hardware/arduino/cores/arduino/HID.cpp index e6fb5f7c8..b60b3c0cc 100644 --- a/hardware/arduino/cores/arduino/HID.cpp +++ b/hardware/arduino/cores/arduino/HID.cpp @@ -144,7 +144,6 @@ u8 _hid_protocol = 1; u8 _hid_idle = 1; #define WEAK __attribute__ ((weak)) -#define WEAK int WEAK HID_GetInterface(u8* interfaceNum) { @@ -245,7 +244,7 @@ void Mouse_::release(uint8_t b) bool Mouse_::isPressed(uint8_t b) { - if (b & _buttons > 0) + if ((b & _buttons) > 0) return true; return false; } diff --git a/hardware/arduino/cores/arduino/USBAPI.h b/hardware/arduino/cores/arduino/USBAPI.h index 6a0b989b5..3c97ff19c 100644 --- a/hardware/arduino/cores/arduino/USBAPI.h +++ b/hardware/arduino/cores/arduino/USBAPI.h @@ -104,7 +104,7 @@ private: void setKeyMap(KeyMap* keyMap); public: Keyboard_(); - virtual size_t write(uint8_t c) {type(c);}; + virtual size_t write(uint8_t c) {return type(c);}; virtual size_t type(uint8_t c); }; extern Keyboard_ Keyboard;