1
0
Fork 0
forked from len0rd/rockbox

pp5002: Fix warning in the USB detection code

A function that returned bool was an alias for a function that returned
an int. While that original function was limited to returning either 0
or 1, this aliasing is technially a no-no.  So create a small shim to
make the warning go away.

Change-Id: I4d7807730234928bd59d75f13a4e4adeabbf655e
This commit is contained in:
Solomon Peachy 2025-04-30 07:12:26 -04:00
parent 69c0c3f207
commit 6a8f1a7e84

View file

@ -78,4 +78,8 @@ int usb_detect(void)
return USB_EXTRACTED;
}
bool usb_plugged(void) __attribute__((alias("usb_detect")));
bool usb_plugged(void)
{
return (usb_detect() == USB_INSERTED);
}