USB HID: Fixed warnings about unused variables.
This commit is contained in:
@@ -79,13 +79,14 @@ JoystickProtocolHandler::JoystickProtocolHandler(HIDReport &report)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 axis = 0;
|
// TODO: "axis" is set but not used!
|
||||||
|
// uint16 axis = 0;
|
||||||
if (item->UsageID() >= B_HID_UID_GD_X
|
if (item->UsageID() >= B_HID_UID_GD_X
|
||||||
&& item->UsageID() <= B_HID_UID_GD_WHEEL) {
|
&& 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
|
} else if (item->UsageID() >= B_HID_UID_GD_VX
|
||||||
&& item->UsageID() <= B_HID_UID_GD_VNO) {
|
&& item->UsageID() <= B_HID_UID_GD_VNO) {
|
||||||
axis = item->UsageID() - B_HID_UID_GD_VX;
|
// axis = item->UsageID() - B_HID_UID_GD_VX;
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ KeyboardProtocolHandler::AddHandlers(HIDDevice &device,
|
|||||||
for (uint32 i = 0; i < inputReportCount; i++) {
|
for (uint32 i = 0; i < inputReportCount; i++) {
|
||||||
HIDReport *inputReport = inputReports[i];
|
HIDReport *inputReport = inputReports[i];
|
||||||
|
|
||||||
bool mayHaveOutput = false;
|
// bool mayHaveOutput = false;
|
||||||
bool foundKeyboardUsage = false;
|
bool foundKeyboardUsage = false;
|
||||||
for (uint32 j = 0; j < inputReport->CountItems(); j++) {
|
for (uint32 j = 0; j < inputReport->CountItems(); j++) {
|
||||||
HIDReportItem *item = inputReport->ItemAt(j);
|
HIDReportItem *item = inputReport->ItemAt(j);
|
||||||
@@ -238,7 +238,7 @@ KeyboardProtocolHandler::AddHandlers(HIDDevice &device,
|
|||||||
&& item->Array())) {
|
&& item->Array())) {
|
||||||
// found at least one item with a keyboard usage or with
|
// found at least one item with a keyboard usage or with
|
||||||
// a consumer/button usage that is handled like a key
|
// 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;
|
foundKeyboardUsage = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user