Skip to content

Commit dd5ff8f

Browse files
committed
Fix unused variable compilation warning on non Linux platforms
1 parent a802fa7 commit dd5ff8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

uhubctl.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ static int set_port_status_linux(struct libusb_device_handle *devh, struct hub_i
546546

547547
int disable_fd = open(disable_path, O_WRONLY);
548548
if (disable_fd >= 0) {
549-
rc = write(disable_fd, on ? "0" : "1", 1);
550-
close(disable_fd);
549+
rc = write(disable_fd, on ? "0" : "1", 1);
550+
close(disable_fd);
551551
}
552552

553553
if (disable_fd < 0 || rc < 0) {
@@ -616,6 +616,8 @@ static int set_port_status(struct libusb_device_handle *devh, struct hub_info *h
616616
return 0;
617617
}
618618
}
619+
#else
620+
(void)hub;
619621
#endif
620622

621623
return set_port_status_libusb(devh, port, on);

0 commit comments

Comments
 (0)