From 75f59a47ec90bfd4f21bfbab7536c4ad13847595 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Wed, 5 Mar 2014 11:49:05 -0800 Subject: test: remove 64-bit multiplication On some CPU cores, the compiler needs an helper to perform the 64-bit multiplication. As the only 64-bit multiplication in the code base is not necessary, fix it rather than adding the helper. Signed-off-by: Vincent Palatin BRANCH=none BUG=none TEST=build for Cortex-M0 platform. Change-Id: Id5d6b4b6641f81732a456dacb78dee7262f6729d Reviewed-on: https://chromium-review.googlesource.com/188980 Reviewed-by: Daisuke Nojiri Reviewed-by: Randall Spangler Commit-Queue: Vincent Palatin Tested-by: Vincent Palatin --- test/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/utils.c') diff --git a/test/utils.c b/test/utils.c index 8ab31d71c8..9d33a1264f 100644 --- a/test/utils.c +++ b/test/utils.c @@ -99,7 +99,7 @@ static int test_memmove(void) /* Expected about 4x speed gain. Use 3x because it fluctuates */ #ifndef TEST_COVERAGE /* Measuring coverage makes it fluctuate even more, so skip it. */ - TEST_ASSERT((t1.val-t0.val) > (t3.val-t2.val) * 3); + TEST_ASSERT((t1.val-t0.val) > (unsigned)(t3.val-t2.val) * 3); #endif /* Test small moves */ @@ -145,7 +145,7 @@ static int test_memcpy(void) TEST_ASSERT_ARRAY_EQ(buf + dest_offset, buf, len); /* Expected about 4x speed gain. Use 3x because it fluctuates */ - TEST_ASSERT((t1.val-t0.val) > (t3.val-t2.val) * 3); + TEST_ASSERT((t1.val-t0.val) > (unsigned)(t3.val-t2.val) * 3); memcpy(buf + dest_offset + 1, buf + 1, len - 1); TEST_ASSERT_ARRAY_EQ(buf + dest_offset + 1, buf + 1, len - 1); -- cgit v1.2.1