From 6de5bf669850efb214fb30feb2bc07460baa5c91 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Fri, 28 Aug 2020 17:14:51 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45025 Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- payloads/libpayload/include/usb/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/libpayload/include') diff --git a/payloads/libpayload/include/usb/usb.h b/payloads/libpayload/include/usb/usb.h index f79fc27711..43c7b4279d 100644 --- a/payloads/libpayload/include/usb/usb.h +++ b/payloads/libpayload/include/usb/usb.h @@ -334,7 +334,7 @@ int usb_interface_check(u16 vendor, u16 device); #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; -- cgit v1.2.3