summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2021-07-28 09:57:36 -0700
committerCommit Bot <commit-bot@chromium.org>2021-07-31 00:15:38 +0000
commit4942624ebdb188fc3e566f524c7412941a7e35a8 (patch)
tree903d0de57a0bf119a2dc9a56eef72cc11682697f /test
parentb67fe7795db328b01b77b2c86dd4ad7a76bc7c6a (diff)
downloadchrome-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')
-rw-r--r--test/usb_typec_drp_acc_trysrc.c4
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");