diff options
author | Evan Green <evgreen@chromium.org> | 2021-07-28 09:57:36 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-31 00:15:38 +0000 |
commit | 4942624ebdb188fc3e566f524c7412941a7e35a8 (patch) | |
tree | 903d0de57a0bf119a2dc9a56eef72cc11682697f /test/usb_typec_drp_acc_trysrc.c | |
parent | b67fe7795db328b01b77b2c86dd4ad7a76bc7c6a (diff) | |
download | chrome-ec-4942624ebdb188fc3e566f524c7412941a7e35a8.tar.gz |
test: Fix printf formatting in usb_typec_drp_acc_trysrc.c
Fix a couple of minor formatting errors where constants with LL or ULL
suffixes were being printed. On x86_64 printing these as %l is fine
because longs are 64-bits. On i686 this comes out as an error because
long is 32-bits. Use the correct ll specifier for these, and in one case
ensure it comes out as a 64-bit value by adding LL.
BUG=b:179062230
BRANCH=none
TEST=make -j runhosttests on i686 and x86_64
Signed-off-by: Evan Green <evgreen@chromium.org>
Change-Id: Ic59c9647aa70f58e497b9615122ca4c202504365
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3059228
Commit-Queue: caveh jalali <caveh@chromium.org>
Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'test/usb_typec_drp_acc_trysrc.c')
-rw-r--r-- | test/usb_typec_drp_acc_trysrc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/usb_typec_drp_acc_trysrc.c b/test/usb_typec_drp_acc_trysrc.c index e65a92196d..96ed5601b7 100644 --- a/test/usb_typec_drp_acc_trysrc.c +++ b/test/usb_typec_drp_acc_trysrc.c @@ -703,7 +703,7 @@ __maybe_unused static int test_auto_toggle_delay(void) */ task_wait_event(SECOND); TEST_GT(mock_tcpc.first_call_to_enable_auto_toggle - time, - 15ul * MSEC, "%lu"); + (uint64_t)15 * MSEC, "%" PRIu64); return EC_SUCCESS; } @@ -733,7 +733,7 @@ __maybe_unused static int test_auto_toggle_delay_early_connect(void) /* Ensure the auto toggle enable was never called */ task_wait_event(SECOND); TEST_EQ(mock_tcpc.first_call_to_enable_auto_toggle, - TIMER_DISABLED, "%lu"); + TIMER_DISABLED, "%" PRIu64); /* Ensure that the first CC set call was to Rd. */ TEST_GT(cc_pull_count, 0, "%d"); |