Skip to content

Commit

Permalink
macOS: Fix build warnings (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
triplef authored Feb 5, 2022
1 parent c84e42a commit e08ddce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mac/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit e08ddce

Please sign in to comment.