summaryrefslogtreecommitdiff
path: root/include/printf.h
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2019-09-23 12:57:40 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-05 00:47:45 +0000
commit3564b23531fc1814924f39e7ac97751d758c14db (patch)
tree39a04f30177288afe594f0d2a22a434a4a5b00f6 /include/printf.h
parente34fca3e01d75552ad8d712879c3ccd6a6168584 (diff)
downloadchrome-ec-3564b23531fc1814924f39e7ac97751d758c14db.tar.gz
printf: Add support for %z
When printing size_t sized integers, utilize the standard %z modifier so that the specifier format is correct. This will enable us to turn on compile-time printf format verification. BUG=chromium:984041 TEST=make -j buildall BRANCH=none Cq-Depend:chrome-internal:1860160 Change-Id: I2c95df5c0d87677cb9fcbde33ab8846708a774a1 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1819651 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include/printf.h')
-rw-r--r--include/printf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/printf.h b/include/printf.h
index 6e245a3f2a..a5243c79b4 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -35,6 +35,7 @@
* useful for printing times, voltages, and currents.
*
* Length may be:
+ * - 'z' = integer is sizeof(size_t)
* - 'l' = integer is 64-bit instead of native 32-bit
*
* Type may be: