macOS: Fix build warnings (#374)

This commit is contained in:
Frederik Seiffert
2022-02-05 16:24:20 +01:00
committed by GitHub
parent c84e42ad91
commit e08ddcee5f
+4 -4
View File
@@ -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)