Skip to content

Commit e08ddce

Browse files
authored
macOS: Fix build warnings (signal11#374)
1 parent c84e42a commit e08ddce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mac/hid.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static struct hid_device_info *create_device_info_with_usage(IOHIDDeviceRef dev,
381381
struct hid_device_info *cur_dev;
382382
io_object_t iokit_dev;
383383
kern_return_t res;
384-
uint64_t entry_id;
384+
uint64_t entry_id = 0;
385385

386386
if (dev == NULL) {
387387
return NULL;
@@ -905,7 +905,7 @@ static int set_report(hid_device *dev, IOHIDReportType type, const unsigned char
905905
data_to_send, length_to_send);
906906

907907
if (res == kIOReturnSuccess) {
908-
return length;
908+
return (int) length;
909909
}
910910

911911
return -1;
@@ -939,7 +939,7 @@ static int get_report(hid_device *dev, IOHIDReportType type, unsigned char *data
939939
if (report_id == 0x0) { /* 0 report number still present at the beginning */
940940
report_length++;
941941
}
942-
return report_length;
942+
return (int) report_length;
943943
}
944944

945945
return -1;
@@ -961,7 +961,7 @@ static int return_data(hid_device *dev, unsigned char *data, size_t length)
961961
dev->input_reports = rpt->next;
962962
free(rpt->data);
963963
free(rpt);
964-
return len;
964+
return (int) len;
965965
}
966966

967967
static int cond_wait(const hid_device *dev, pthread_cond_t *cond, pthread_mutex_t *mutex)

0 commit comments

Comments
 (0)