On 04/27/16 21:36, Bill Fischofer wrote:
Add an additional cast to avoid compile errors in 32-bit mode

Signed-off-by: Bill Fischofer <[email protected]>
---
  test/validation/packet/packet.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/validation/packet/packet.c b/test/validation/packet/packet.c
index 4bae4d8..654fe0e 100644
--- a/test/validation/packet/packet.c
+++ b/test/validation/packet/packet.c
@@ -1172,7 +1172,7 @@ void packet_test_align(void)
        pkt_data = odp_packet_offset(pkt, 0, &seg_len, NULL);
        offset = seg_len - 5;
        pkt_data = odp_packet_offset(pkt, offset, &seg_len, NULL);
-       if ((uint64_t)pkt_data % max_align == 0) {
+       if ((uint64_t)(uintptr_t)pkt_data % max_align == 0) {
Does only one cast to uintptr_t  work here?

Maxim.

                offset--;
                pkt_data = odp_packet_offset(pkt, offset, &seg_len, NULL);
        }
@@ -1184,7 +1184,7 @@ void packet_test_align(void)
        CU_ASSERT(odp_packet_len(pkt) == pkt_len);
        _packet_compare_offset(pkt, offset, segmented_test_packet, offset,
                               aligned_seglen);
-       CU_ASSERT((uint64_t)aligned_data % max_align == 0);
+       CU_ASSERT((uint64_t)(uintptr_t)aligned_data % max_align == 0);
odp_packet_free(pkt);
  }

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to