Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45025 )
Change subject: libpayload/usb: Add format string checking to usb_debug ......................................................................
libpayload/usb: Add format string checking to usb_debug
This turns on the compiler's printf style format string checker.
BUG=b:167517417 TEST=enabled all USB controllers on volteer and fixed resulting compiler errors when USB_DEBUG is enabled.
Change-Id: Ic94ebcbafdde8a5f79278b5635111b99af40f892 Signed-off-by: Caveh Jalali caveh@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/45025 Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M payloads/libpayload/include/usb/usb.h 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved
diff --git a/payloads/libpayload/include/usb/usb.h b/payloads/libpayload/include/usb/usb.h index f79fc27..43c7b42 100644 --- a/payloads/libpayload/include/usb/usb.h +++ b/payloads/libpayload/include/usb/usb.h @@ -334,7 +334,7 @@ #define USB_QUIRK_TEST (1 << 31) #define USB_QUIRK_NONE 0
-static inline void usb_debug(const char *fmt, ...) +static inline void __attribute__((format(printf, 1, 2))) usb_debug(const char *fmt, ...) { #ifdef USB_DEBUG va_list ap;