summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2020-08-28 17:14:51 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-11-22 22:34:55 +0000
commit6de5bf669850efb214fb30feb2bc07460baa5c91 (patch)
tree86dbcf50a60a459c109d519981ac4304a6a0e5fd /payloads/libpayload
parent8079a6a558526730d994aa56bf23139fbad2141c (diff)
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')
-rw-r--r--payloads/libpayload/include/usb/usb.h2
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;