From 18fc2c206f3e0622fadd4d8ca628942a7152aa9a Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 15 Oct 2019 09:52:44 +0200 Subject: [PATCH] unittests: fix `tests-pkt` for non-32bit platforms --- tests/unittests/tests-pkt/Makefile.include | 4 ---- tests/unittests/tests-pkt/tests-pkt.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/unittests/tests-pkt/Makefile.include b/tests/unittests/tests-pkt/Makefile.include index 3c18d4e3f7..0577e7d9a3 100644 --- a/tests/unittests/tests-pkt/Makefile.include +++ b/tests/unittests/tests-pkt/Makefile.include @@ -1,5 +1 @@ USEMODULE += gnrc_ipv6 - -# Test assumes 32-bit width for `size_t` which is only the case on our 32-bit -# platforms -FEATURES_REQUIRED += arch_32bit diff --git a/tests/unittests/tests-pkt/tests-pkt.c b/tests/unittests/tests-pkt/tests-pkt.c index 34ccc73bec..f127207c71 100644 --- a/tests/unittests/tests-pkt/tests-pkt.c +++ b/tests/unittests/tests-pkt/tests-pkt.c @@ -185,8 +185,8 @@ static void test_pkt_equals_iolist(void) TEST_ASSERT_EQUAL_INT(0, memcmp(&iol, &pkt, sizeof(iol))); /* check size position */ - iol.iol_len = 0x12345678; - pkt.size = 0x12345678; + iol.iol_len = (size_t)0x12345678; + pkt.size = (size_t)0x12345678; TEST_ASSERT_EQUAL_INT(0, memcmp(&iol, &pkt, sizeof(iol)));