summaryrefslogtreecommitdiff
path: root/common/printf.c
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 /common/printf.c
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 'common/printf.c')
-rw-r--r--common/printf.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/common/printf.c b/common/printf.c
index 68f66815b9..1f6733e552 100644
--- a/common/printf.c
+++ b/common/printf.c
@@ -230,17 +230,6 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context,
* %z - size_t
*/
if (c == 'l') {
-
- /*
- * For just this commit, allow both %l and %ll
- * to be 64-bit. This is obviously wrong, but
- * enables this change to be cherry-picked
- * into firmware branches without changing
- * semantics for any existing printf calls.
- * This is removed in the subsequent commit on
- * master.
- */
- flags |= PF_64BIT;
if (sizeof(long) == sizeof(uint64_t))
flags |= PF_64BIT;