On Darwin, you can't compare CFIndex to size_t safely. #196

Closed
opened 2020-10-08 00:14:27 -05:00 by gnachman · 0 comments
gnachman commented 2020-10-08 00:14:27 -05:00 (Migrated from github.com)

Building on a Mac (10.15 with Xcode 12) gives:

hidapi/mac/hid.c:267:20: warning: comparison of integers of different signs: 'CFIndex' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
                if (chars_copied == len)
                    ~~~~~~~~~~~~ ^  ~~~

I built via cython-hidapi (https://github.com/trezor/cython-hidapi/issues/95), but I would expect the same warning regardless of how it's built.

Building on a Mac (10.15 with Xcode 12) gives: ``` hidapi/mac/hid.c:267:20: warning: comparison of integers of different signs: 'CFIndex' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (chars_copied == len) ~~~~~~~~~~~~ ^ ~~~ ``` I built via cython-hidapi (https://github.com/trezor/cython-hidapi/issues/95), but I would expect the same warning regardless of how it's built.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi#196
No description provided.