summaryrefslogtreecommitdiff
path: root/cts
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2019-09-23 13:07:06 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-05 00:47:48 +0000
commit0c2d7b648e1ea433aad8123538632d4edff6eb85 (patch)
tree32b535dd6284c9008817a641b728a6784fdceb0c /cts
parent3564b23531fc1814924f39e7ac97751d758c14db (diff)
downloadchrome-ec-0c2d7b648e1ea433aad8123538632d4edff6eb85.tar.gz
printf: Convert %l to %ll
In order to make our printf more standard, utilize %ll for long long arguments, rather than %l. This does cost a little bit in flash space for that extra l in a couple of places, but enables us to turn on compile-time printf format checking. For this commit only, the semantics are such that both %l and %ll take 64-bit arguments. In the next commit, %l goes to its correct behavior of taking a sizeof(long) argument. BUG=chromium:984041 TEST=make -j buildall BRANCH=none Cq-Depend:chrome-internal:1863686,chrome-internal:1860161,chrome-internal:1914029 Change-Id: I18081b55a8dbf5ef8ec15fc499ca75e59d31da58 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1819652 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'cts')
-rw-r--r--cts/hook/dut.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cts/hook/dut.c b/cts/hook/dut.c
index 41c7068114..f3a52ddaf4 100644
--- a/cts/hook/dut.c
+++ b/cts/hook/dut.c
@@ -91,14 +91,14 @@ static enum cts_rc test_ticks(void)
error_pct = (interval - HOOK_TICK_INTERVAL) * 100 /
HOOK_TICK_INTERVAL;
if (error_pct < -10 || 10 < error_pct) {
- CPRINTS("tick error=%d%% interval=%ld", error_pct, interval);
+ CPRINTS("tick error=%d%% interval=%lld", error_pct, interval);
return CTS_RC_FAILURE;
}
interval = second_time[1].val - second_time[0].val;
error_pct = (interval - SECOND) * 100 / SECOND;
if (error_pct < -10 || 10 < error_pct) {
- CPRINTS("second error=%d%% interval=%ld", error_pct, interval);
+ CPRINTS("second error=%d%% interval=%lld", error_pct, interval);
return CTS_RC_FAILURE;
}