diff options
author | Caveh Jalali <caveh@chromium.org> | 2020-08-28 17:14:51 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-22 22:34:55 +0000 |
commit | 6de5bf669850efb214fb30feb2bc07460baa5c91 (patch) | |
tree | 86dbcf50a60a459c109d519981ac4304a6a0e5fd /payloads/libpayload/include/usb/usb.h | |
parent | 8079a6a558526730d994aa56bf23139fbad2141c (diff) | |
download | coreboot-6de5bf669850efb214fb30feb2bc07460baa5c91.tar.xz |
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>
Diffstat (limited to 'payloads/libpayload/include/usb/usb.h')
-rw-r--r-- | payloads/libpayload/include/usb/usb.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; |