mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
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:
parent
69c0c3f207
commit
6a8f1a7e84
1 changed files with 5 additions and 1 deletions
|
@ -78,4 +78,8 @@ int usb_detect(void)
|
||||||
|
|
||||||
return USB_EXTRACTED;
|
return USB_EXTRACTED;
|
||||||
}
|
}
|
||||||
bool usb_plugged(void) __attribute__((alias("usb_detect")));
|
|
||||||
|
bool usb_plugged(void)
|
||||||
|
{
|
||||||
|
return (usb_detect() == USB_INSERTED);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue