diff options
author | Evan Green <evgreen@chromium.org> | 2019-09-23 12:57:40 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-05 00:47:45 +0000 |
commit | 3564b23531fc1814924f39e7ac97751d758c14db (patch) | |
tree | 39a04f30177288afe594f0d2a22a434a4a5b00f6 /test/printf.c | |
parent | e34fca3e01d75552ad8d712879c3ccd6a6168584 (diff) | |
download | chrome-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 'test/printf.c')
-rw-r--r-- | test/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/printf.c b/test/printf.c index 97bb00c4be..28a78ca973 100644 --- a/test/printf.c +++ b/test/printf.c @@ -26,7 +26,7 @@ int run(int expect_ret, const char *expect, int rv; ccprintf("\n"); - ccprintf("size_limit=%-4d | format='%s'\n", size_limit, format); + ccprintf("size_limit=%-4zd | format='%s'\n", size_limit, format); ccprintf("expect ='%s' | expect_status=%d\n", expect ? expect : "NO_BYTES_TOUCHED", expect_ret); |