From 6a8f1a7e8488bc1b23ad24ddccdac43778b10bc8 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 30 Apr 2025 07:12:26 -0400 Subject: [PATCH] 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 --- firmware/target/arm/pp/usb-fw-pp5002.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/target/arm/pp/usb-fw-pp5002.c b/firmware/target/arm/pp/usb-fw-pp5002.c index d0fbbd6e48..452d1e0061 100644 --- a/firmware/target/arm/pp/usb-fw-pp5002.c +++ b/firmware/target/arm/pp/usb-fw-pp5002.c @@ -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); +}