From 526e95c5cde3c120d82b74a711acd1dbf6b502d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 3 Sep 2013 17:54:13 +0200 Subject: [PATCH] USB HID: Fixed warnings about unused variables. --- .../drivers/input/usb_hid/JoystickProtocolHandler.cpp | 7 ++++--- .../drivers/input/usb_hid/KeyboardProtocolHandler.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/drivers/input/usb_hid/JoystickProtocolHandler.cpp b/src/add-ons/kernel/drivers/input/usb_hid/JoystickProtocolHandler.cpp index e7aff1368a..20ab159764 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/JoystickProtocolHandler.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/JoystickProtocolHandler.cpp @@ -79,13 +79,14 @@ JoystickProtocolHandler::JoystickProtocolHandler(HIDReport &report) break; } - uint16 axis = 0; +// TODO: "axis" is set but not used! +// uint16 axis = 0; if (item->UsageID() >= B_HID_UID_GD_X && item->UsageID() <= B_HID_UID_GD_WHEEL) { - axis = item->UsageID() - B_HID_UID_GD_X; +// axis = item->UsageID() - B_HID_UID_GD_X; } else if (item->UsageID() >= B_HID_UID_GD_VX && item->UsageID() <= B_HID_UID_GD_VNO) { - axis = item->UsageID() - B_HID_UID_GD_VX; +// axis = item->UsageID() - B_HID_UID_GD_VX; } else break; diff --git a/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp b/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp index 083c5fe431..a04f896db1 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp @@ -224,7 +224,7 @@ KeyboardProtocolHandler::AddHandlers(HIDDevice &device, for (uint32 i = 0; i < inputReportCount; i++) { HIDReport *inputReport = inputReports[i]; - bool mayHaveOutput = false; +// bool mayHaveOutput = false; bool foundKeyboardUsage = false; for (uint32 j = 0; j < inputReport->CountItems(); j++) { HIDReportItem *item = inputReport->ItemAt(j); @@ -238,7 +238,7 @@ KeyboardProtocolHandler::AddHandlers(HIDDevice &device, && item->Array())) { // found at least one item with a keyboard usage or with // a consumer/button usage that is handled like a key - mayHaveOutput = item->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD; +// mayHaveOutput = item->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD; foundKeyboardUsage = true; break; }