mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-20 05:53:38 -04:00
linux: fix gcc warnings when INVASIVE_GET_USAGE is defined.
This commit is contained in:
committed by
Alan Ott
parent
d5710b4f96
commit
3bfaffbfe0
+3
-2
@@ -181,7 +181,7 @@ static uint32_t get_bytes(uint8_t *rpt, size_t len, size_t num_bytes, size_t cur
|
||||
static int get_usage(uint8_t *report_descriptor, size_t size,
|
||||
unsigned short *usage_page, unsigned short *usage)
|
||||
{
|
||||
int i = 0;
|
||||
unsigned int i = 0;
|
||||
int size_code;
|
||||
int data_len, key_size;
|
||||
int usage_found = 0, usage_page_found = 0;
|
||||
@@ -509,6 +509,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
|
||||
get_usb_string(handle, desc.iProduct);
|
||||
|
||||
#ifdef INVASIVE_GET_USAGE
|
||||
{
|
||||
/*
|
||||
This section is removed because it is too
|
||||
invasive on the system. Getting a Usage Page
|
||||
@@ -567,7 +568,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
|
||||
LOG("Couldn't re-attach kernel driver.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif // INVASIVE_GET_USAGE
|
||||
|
||||
libusb_close(handle);
|
||||
|
||||
Reference in New Issue
Block a user