summaryrefslogtreecommitdiff
path: root/include/printf.h
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2019-10-01 14:14:13 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-05 00:47:51 +0000
commit2eade31e87a7662dc03dcead556917dfa13d0983 (patch)
tree5a2747f5fd859d842e034e13e349a9f0e76234e1 /include/printf.h
parent0c2d7b648e1ea433aad8123538632d4edff6eb85 (diff)
downloadchrome-ec-2eade31e87a7662dc03dcead556917dfa13d0983.tar.gz
printf: Correct semantics of %l
In the standard, %l[dioux] takes an integer of type long. In the EC up until now, we had been using it as shorthand for a 64-bit long. Now that we're enabling the compile-time printf format checker, it's time to correct the semantics of %l. This is a breaking change. I would advise against cherry-picking this commit into any firmware branches. The reasoning is that the specifier now swallows a different number of arguments, causing any subsequent specifiers to be wrong. BUG=chromium:984041 TEST=make -j buildall BRANCH=None Change-Id: Ia5630e59611097dc0deda648498c7f43b9c62ac9 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1829576 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include/printf.h')
-rw-r--r--include/printf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/printf.h b/include/printf.h
index 9ae284cecc..ccd477cfbd 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -35,7 +35,7 @@
* useful for printing times, voltages, and currents.
*
* Length may be:
- * - 'l' = integer is 64-bit instead of native 32-bit
+ * - 'l' = integer is sizeof(long) (still 32 bits on 32-bit ECs)
* - 'll' = integer is 64-bit
* - 'z' = integer is sizeof(size_t)
*