mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-19 13:34:37 -04:00
macOS: Fix build warnings (#374)
This commit is contained in:
committed by
GitHub
parent
c84e42ad91
commit
e08ddcee5f
@@ -381,7 +381,7 @@ static struct hid_device_info *create_device_info_with_usage(IOHIDDeviceRef dev,
|
||||
struct hid_device_info *cur_dev;
|
||||
io_object_t iokit_dev;
|
||||
kern_return_t res;
|
||||
uint64_t entry_id;
|
||||
uint64_t entry_id = 0;
|
||||
|
||||
if (dev == NULL) {
|
||||
return NULL;
|
||||
@@ -905,7 +905,7 @@ static int set_report(hid_device *dev, IOHIDReportType type, const unsigned char
|
||||
data_to_send, length_to_send);
|
||||
|
||||
if (res == kIOReturnSuccess) {
|
||||
return length;
|
||||
return (int) length;
|
||||
}
|
||||
|
||||
return -1;
|
||||
@@ -939,7 +939,7 @@ static int get_report(hid_device *dev, IOHIDReportType type, unsigned char *data
|
||||
if (report_id == 0x0) { /* 0 report number still present at the beginning */
|
||||
report_length++;
|
||||
}
|
||||
return report_length;
|
||||
return (int) report_length;
|
||||
}
|
||||
|
||||
return -1;
|
||||
@@ -961,7 +961,7 @@ static int return_data(hid_device *dev, unsigned char *data, size_t length)
|
||||
dev->input_reports = rpt->next;
|
||||
free(rpt->data);
|
||||
free(rpt);
|
||||
return len;
|
||||
return (int) len;
|
||||
}
|
||||
|
||||
static int cond_wait(const hid_device *dev, pthread_cond_t *cond, pthread_mutex_t *mutex)
|
||||
|
||||
Reference in New Issue
Block a user