diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-09-09 14:00:03 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-09-09 14:00:03 +0000 |
commit | 7a51e97c3b8d8b1af193cb54c77d12ecba03f898 (patch) | |
tree | 95fbdf9ca11bba627d09b9429b5e00ab7dd8a1fb /LUFA/Drivers/USB/Class/Common | |
parent | 0284385b4e1c9a629e5c5b89ecc701a3d9bd5001 (diff) | |
download | lufa-7a51e97c3b8d8b1af193cb54c77d12ecba03f898.tar.gz lufa-7a51e97c3b8d8b1af193cb54c77d12ecba03f898.tar.bz2 lufa-7a51e97c3b8d8b1af193cb54c77d12ecba03f898.zip |
Update LUFA core to be compatible with the AVR-GCC -Wswitch-default warning switch.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Common')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/HIDParser.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index 4447e8a0b..4b4667b4f 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -53,7 +53,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, while (ReportSize) { uint8_t HIDReportItem = *ReportData; - uint32_t ReportItemData = 0; + uint32_t ReportItemData; ReportData++; ReportSize--; @@ -66,16 +66,22 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, ReportSize -= 4; ReportData += 4; break; + case HID_RI_DATA_BITS_16: ReportItemData = (((uint16_t)ReportData[1] << 8) | (ReportData[0])); ReportSize -= 2; ReportData += 2; break; + case HID_RI_DATA_BITS_8: ReportItemData = ReportData[0]; ReportSize -= 1; ReportData += 1; break; + + default: + ReportItemData = 0; + break; } switch (HIDReportItem & (HID_RI_TYPE_MASK | HID_RI_TAG_MASK)) @@ -269,6 +275,9 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, } break; + + default: + break; } if ((HIDReportItem & HID_RI_TYPE_MASK) == HID_RI_TYPE_MAIN) |