summaryrefslogtreecommitdiff
path: root/util/ecst.h
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2019-07-11 10:40:19 -0700
committerCommit Bot <commit-bot@chromium.org>2019-07-16 00:15:42 +0000
commit92094927ded5bb9729636377642204b16b9bb961 (patch)
tree2ae3fad338185ab1f1f8e09623e502f551bbd9fa /util/ecst.h
parentc9db0502fa3b0de422e46798d489d803f79b9118 (diff)
downloadchrome-ec-92094927ded5bb9729636377642204b16b9bb961.tar.gz
util: ecst: Fix Coverity print format warnings
I noticed Coverity is complaining about a handful of printf format warnings. These were all valid. It looks like a robot, or perhaps a very hasty human went through and split printf strings that extended over 80 columns into multiple calls. But they didn't make sure that the arguments went into the correct corresponding printf call. Recombine a few of those printfs back into a single call, and fix a few other printf-related odds and ends. Also, add the format specifier to my_printf so that these errors are detected at compile time in the future. BUG=chromium:984041 TEST=make -j buildall BRANCH=None Change-Id: I27b352b97d50fbbaee2fb801b817ef82ad90ca98 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1698488
Diffstat (limited to 'util/ecst.h')
-rw-r--r--util/ecst.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/ecst.h b/util/ecst.h
index 7470b3ab6c..423f65a102 100644
--- a/util/ecst.h
+++ b/util/ecst.h
@@ -269,6 +269,7 @@ int read_from_file(unsigned int offset,
char *print_string);
/* Nice Particular Printf - General */
+__attribute__((__format__(__printf__, 2, 3)))
void my_printf(int error_level, char *fmt, ...);
int str_cmp_no_case(const char *s1, const char *s2);