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/nvmem_tpm2_mock.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/nvmem_tpm2_mock.c')
-rw-r--r-- | test/nvmem_tpm2_mock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/nvmem_tpm2_mock.c b/test/nvmem_tpm2_mock.c index 3b2e5340ad..a6d32bcb34 100644 --- a/test/nvmem_tpm2_mock.c +++ b/test/nvmem_tpm2_mock.c @@ -302,7 +302,7 @@ size_t add_evictable_obj(void *obj, size_t obj_size) next_addr = end_addr + sizeof(uint32_t) + obj_size; if (next_addr >= s_evictNvEnd) { - ccprintf("%s: could not fit %d bytes!\n", __func__, obj_size); + ccprintf("%s: could not fit %zd bytes!\n", __func__, obj_size); return 0; } |