Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb_relay_device_enumerate: silencing -Wunused-but-set-variable #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ricardicus
Copy link

I was building usb-relay-hid on my machine and ran into this warning:

../../lib/usb_relay_lib.c: In function ‘usb_relay_device_enumerate’:
../../lib/usb_relay_lib.c:382:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret;
^~~

There is a return code from usbhidEnumDevices that is not looked at.
Since the returning value pusb_relay_device_info_t is a pointer-type,
I figured if this error appears, NULL is returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants