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 /chip/ish | |
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 'chip/ish')
-rw-r--r-- | chip/ish/heci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/ish/heci.c b/chip/ish/heci.c index 146aa175f5..309a17c0a1 100644 --- a/chip/ish/heci.c +++ b/chip/ish/heci.c @@ -891,8 +891,8 @@ static int is_hbm_validity(struct hbm_h2i *h2i, size_t length) } if (valid_msg_len != length) { - CPRINTF("invalid cmd(%d) valid : %d, cur : %d\n", - valid_msg_len, length); + CPRINTF("invalid cmd(%d) valid : %d, cur : %zd\n", + h2i->cmd, valid_msg_len, length); /* TODO: invalid cmd. not sure to reply with error ? */ return 0; } |