USB HID: Fixed warnings about unused variables.

This commit is contained in:
Stephan Aßmus 2013-09-03 17:54:13 +02:00
parent 2019bf1e17
commit 526e95c5cd
2 changed files with 6 additions and 5 deletions

View File

@ -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;

View File

@ -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;
}