signal11 / hidapi

A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac, and Windows.
http://www.signal11.us/oss/hidapi/
Other
2.46k stars 901 forks source link

Failed to compile openocd due to missing void parameter in prototypes #464

Open bdmihai opened 4 years ago

bdmihai commented 4 years ago

Hello,

Compiling openocd (latest version from git) fails with the following error message:

/usr/include/hidapi/hidapi.h:481:32: error: function declaration isn’t a prototype [-Werror=strict-prototypes] 481 | HID_API_EXPORT const struct hid_api_version HID_API_CALL hid_version(); | ^~~~~~~ /usr/include/hidapi/hidapi.h:491:3: error: function declaration isn’t a prototype [-Werror=strict-prototypes] 491 | HID_API_EXPORT const char HID_API_CALL hid_version_str(); | ^~~~~~

Adding void as parameter for the two functions will fix the issue. HID_API_EXPORT const struct hid_api_version HID_API_CALL hid_version(void); HID_API_EXPORT const char HID_API_CALL hid_version_str(void);

Would be possible to fix this in order to avoid this problem?

BR, Mihai

Youw commented 4 years ago

Please see #373 And https://github.com/libusb/hidapi/pull/207