diff options
author | Evan Green <evgreen@chromium.org> | 2019-09-23 13:23:09 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-05 00:47:53 +0000 |
commit | 44c473cdeae53aba84fc2ababeaeb7d022ea4dd7 (patch) | |
tree | 21e6b57ad698970f64c0e38cbf79cbd8e2f39e73 /util | |
parent | 7200037dfc674977bffc3d58a15547d97f3ef681 (diff) | |
download | chrome-ec-44c473cdeae53aba84fc2ababeaeb7d022ea4dd7.tar.gz |
printf: Enable compile-time format checking
Add annotations to allow the compiler to check printf-style format
strings in the EC.
BUG=chromium:984041
TEST=make -j buildall
BRANCH=None
Change-Id: Ic39f37f8362372de7d289becea684d9da535599a
Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1733101
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/genvif.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/genvif.c b/util/genvif.c index 4891568ed7..ba217a4acf 100644 --- a/util/genvif.c +++ b/util/genvif.c @@ -274,6 +274,7 @@ static uint32_t bcddevice_sop(void) } /* Application exits on failure */ +__attribute__((__format__(__printf__, 2, 3))) static void append(char **buf, const char *fmt, ...) { va_list ap1, ap2; |