From patchwork Wed Apr 27 18:36:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 66824 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2347501qge; Wed, 27 Apr 2016 11:36:23 -0700 (PDT) X-Received: by 10.50.111.15 with SMTP id ie15mr13052957igb.94.1461782183261; Wed, 27 Apr 2016 11:36:23 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 35si11397440ioi.168.2016.04.27.11.36.22; Wed, 27 Apr 2016 11:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 09B9561563; Wed, 27 Apr 2016 18:36:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id ABAC1611FD; Wed, 27 Apr 2016 18:36:17 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8A617611FE; Wed, 27 Apr 2016 18:36:15 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by lists.linaro.org (Postfix) with ESMTPS id 7035E611F4 for ; Wed, 27 Apr 2016 18:36:14 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id k142so58763016oib.1 for ; Wed, 27 Apr 2016 11:36:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fhSwksPNrUBY0YcDzNhybMye1eqB+JVVzGYZj0kjAPY=; b=Wa9l3e9/GGMFW/CWrjrJh5/5yyd52ZYdMnjqYFA1ouLFZAAoENUgErBmF4es4OtAL0 sz+as2EtthPs5WJxDU2/1MvNGSetTFwsKRVy8s78PdrHKS6Sxo032O+dKpZke3qs0YK4 yb0eUNONnYTw33UhGOTf57bE7PWWwQBBXToLn1lEBxGei0YvERr2p5ogFpThPM+pyyA6 PRnOCu3THbvvJ2LoZKVpGbMSzOJxmIujeOT+V3zEFKWsiweofkmt3fqqyv/PxGpOwfB6 alQSChP4+VYs459wFcGqJVdVEz78eYR2rDcU5PbgCFxqkEi60xhdAu+gkVkwiZkqjnep MH6w== X-Gm-Message-State: AOPr4FUWEjndLLifd/y4QVNM8y85E5nb5EqQs1IFVKghmjK0HRwA9yaYbGgRuWpN0GFsrcRmA6g= X-Received: by 10.202.204.9 with SMTP id c9mr3960417oig.112.1461782173806; Wed, 27 Apr 2016 11:36:13 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id l65sm1662641otc.28.2016.04.27.11.36.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Apr 2016 11:36:12 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 27 Apr 2016 13:36:10 -0500 Message-Id: <1461782170-9154-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH] validation: packet: avoid 32-bit compilation errors X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Add an additional cast to avoid compile errors in 32-bit mode Signed-off-by: Bill Fischofer --- 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) { 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); }