From patchwork Wed Jun 17 21:51:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 49990 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C094C228FF for ; Wed, 17 Jun 2015 21:52:06 +0000 (UTC) Received: by wguu7 with SMTP id u7sf303803wgu.0 for ; Wed, 17 Jun 2015 14:52:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=i/aZl40gucYykQflrfV7ZFN5DtSkWxSPC7sWx5UhvPE=; b=eWg5nFc2aL8XXm5OprIga9pssQTfjC1aFaLCrAhDjZRvY8gAP6AkUyzgKUMOghflp7 WZoljm8ljfDWxWMAEjm4bCRrP6wSO+9py6mIfu/VeRE2Siv+s4f05DTLL/OPwbAXqlgW aTVsz2yHiQoxEHgluTRABHi0sZl3GCEPEe68rJiHMyMH8HuJfNmqr8qR0qbf91wxNmBD HKh/9+1/StyIYuRv5WF2fTuFmoEJyPidhL+j5BpPSQ8mBODLnc6pM8EPVSCyJm5tSkqL i70MtbEpl6QHjfekt/n9h9blig1njQXZuPZrV+6CXlMuGKTQsl2dzO8Y+CaPhNCDESSb 6nRg== X-Gm-Message-State: ALoCoQlFxRDF/jlwTZvFxG9nFwibps15mVwcjLJAYjgESVV3I3MMUjU0ZJyZAZceGCn5u01tK0+0 X-Received: by 10.112.138.2 with SMTP id qm2mr7302985lbb.19.1434577926075; Wed, 17 Jun 2015 14:52:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.224.162 with SMTP id rd2ls358018lac.84.gmail; Wed, 17 Jun 2015 14:52:05 -0700 (PDT) X-Received: by 10.152.87.33 with SMTP id u1mr10126313laz.35.1434577925929; Wed, 17 Jun 2015 14:52:05 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id ql5si4711660lbb.165.2015.06.17.14.52.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2015 14:52:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lacny3 with SMTP id ny3so42468765lac.3 for ; Wed, 17 Jun 2015 14:52:05 -0700 (PDT) X-Received: by 10.152.22.99 with SMTP id c3mr10271916laf.32.1434577925807; Wed, 17 Jun 2015 14:52:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp751214lbb; Wed, 17 Jun 2015 14:52:05 -0700 (PDT) X-Received: by 10.141.18.202 with SMTP id u193mr11116805qhd.16.1434577924587; Wed, 17 Jun 2015 14:52:04 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 132si5812941qhd.25.2015.06.17.14.52.03; Wed, 17 Jun 2015 14:52:04 -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; Received: by lists.linaro.org (Postfix, from userid 109) id 74B8E61F90; Wed, 17 Jun 2015 21:52:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B34EC61DBD; Wed, 17 Jun 2015 21:51:58 +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 1470661DBE; Wed, 17 Jun 2015 21:51:57 +0000 (UTC) Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by lists.linaro.org (Postfix) with ESMTPS id 435C261CB3 for ; Wed, 17 Jun 2015 21:51:56 +0000 (UTC) Received: by iebmu5 with SMTP id mu5so43114514ieb.1 for ; Wed, 17 Jun 2015 14:51:55 -0700 (PDT) X-Received: by 10.107.3.83 with SMTP id 80mr10742969iod.33.1434577915815; Wed, 17 Jun 2015 14:51:55 -0700 (PDT) Received: from mike-laptop.caveonetworks.com (64.2.3.194.ptr.us.xo.net. [64.2.3.194]) by mx.google.com with ESMTPSA id qh9sm12782664igb.20.2015.06.17.14.51.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Jun 2015 14:51:55 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 17 Jun 2015 14:51:48 -0700 Message-Id: <1434577908-311-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Subject: [lng-odp] [PATCH] Validation: pktio: remove assert side effect X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The assert macro also assigns a variable. Potentially modifying (disabling) the macro would also change the operation of the test. Fixes CID 96200 Signed-off-by: Mike Holmes Reviewed-by: Bill Fischofer --- test/validation/pktio/pktio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index 8cfa269..93d68f2 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -541,7 +541,8 @@ static void pktio_test_inq_remdef(void) CU_ASSERT(pktio != ODP_PKTIO_INVALID); CU_ASSERT(create_inq(pktio, ODP_QUEUE_TYPE_POLL) == 0); - CU_ASSERT((inq = odp_pktio_inq_getdef(pktio)) != ODP_QUEUE_INVALID); + inq = odp_pktio_inq_getdef(pktio); + CU_ASSERT(inq != ODP_QUEUE_INVALID); CU_ASSERT(odp_pktio_inq_remdef(pktio) == 0); for (i = 0; i < 100; i++) {