hidapi icon indicating copy to clipboard operation
hidapi copied to clipboard

Failed to compile openocd due to missing void parameter in prototypes

Open bdmihai opened this issue 4 years ago • 1 comments

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

bdmihai avatar Nov 22 '20 21:11 bdmihai

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

Youw avatar Nov 22 '20 21:11 Youw