Closed mossheim closed 4 years ago
pinging this. @kisielk / @joshpar ? just want a sanity check before i start merging stuff into hidapi
I think the best fix would be to have hid_parse_element_info
return a flag so that hid_read_descriptor
(which seems to be the only caller) can then return NULL
to indicate an error.
This covers a compiler warning in the case where the HIDElementType is Collection.
The solution used was to add a default statement to the switch.
@sensestage do you have any thoughts on this? It seems to me like there's no consistent exception handling system here, so I just printed a warning. Since this is lower-level and designed for robust performance, I thought attempting a solution rather than failing via exception or assert would be more graceful and appropriate to this library.