diff --git a/src/hidapi/mac/hid.c b/src/hidapi/mac/hid.c index 1dc9ab9f0..5e98e1cca 100644 --- a/src/hidapi/mac/hid.c +++ b/src/hidapi/mac/hid.c @@ -291,7 +291,7 @@ static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, wchar_t &used_buf_len); buf[chars_copied] = 0; - return chars_copied; + return (int)chars_copied; } else return 0; @@ -327,7 +327,7 @@ static int get_string_property_utf8(IOHIDDeviceRef device, CFStringRef prop, cha &used_buf_len); buf[chars_copied] = 0; - return used_buf_len; + return (int)used_buf_len; } else return 0; @@ -835,7 +835,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; } else if (res == kIOReturnUnsupported) { /*printf("kIOReturnUnsupported\n");*/ @@ -866,7 +866,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) @@ -1031,7 +1031,7 @@ int HID_API_EXPORT hid_get_feature_report(hid_device *dev, unsigned char *data, if (skipped_report_id) len++; - return len; + return (int)len; }