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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/usb_relay_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ It should be called at the end of execution to avoid memory leaks.
int USBRL_API usb_relay_exit(void);

/** Enumerate the USB Relay Devices.
@return Pointer to list of usb_relay_device_info
@return Pointer to list of usb_relay_device_info, NULL if unsuccessful.
Caller should free it with usb_relay_device_free_enumerate
*/
pusb_relay_device_info_t USBRL_API usb_relay_device_enumerate(void);
Expand Down
3 changes: 3 additions & 0 deletions lib/usb_relay_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ pusb_relay_device_info_t USBRL_API usb_relay_device_enumerate(void)
(void*)&ectx,
enumfunc);

if ( ret != 0 )
return NULL;

return (pusb_relay_device_info_t)ectx.head;
}

Expand Down