From patchwork Mon Feb 8 06:20:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 61383 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1258058lbl; Sun, 7 Feb 2016 22:20:40 -0800 (PST) X-Received: by 10.55.56.134 with SMTP id f128mr31824204qka.92.1454912440632; Sun, 07 Feb 2016 22:20:40 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p62si27666728qkl.67.2016.02.07.22.20.40; Sun, 07 Feb 2016 22:20:40 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 011EE616ED; Mon, 8 Feb 2016 06:20:39 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=VxYw5osM; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, 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 F1220616C3; Mon, 8 Feb 2016 06:20:35 +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 CA3C2616CB; Mon, 8 Feb 2016 06:20:33 +0000 (UTC) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by lists.linaro.org (Postfix) with ESMTPS id CE3E0616C1 for ; Mon, 8 Feb 2016 06:20:32 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id 78so88975962lfy.3 for ; Sun, 07 Feb 2016 22:20:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=fb5Fs04VbSt6yb+Fv30sX8vxbvch2KymAtUvF4vD9x4=; b=VxYw5osM9HrZhvrJ38mqrmllUM1BwRU7z29LiDcov+pl0+ExOcvbAsL5Yjx5AX5igP VcwZ8p+0prQkqg7eps8VvZShy1myTNLsdr9Zc3Eaii+AhdBwHc3l5AlI1JNVRKmUqczO hKnAzvOkp2Og935vrEX2c9/pv5JdVzdNGYLdk= 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=fb5Fs04VbSt6yb+Fv30sX8vxbvch2KymAtUvF4vD9x4=; b=i0OXq2YtHJ9z6pPjOKQmyOTmjPIO0Med4dGVeRwgzjJeo0CRls/wvVfd93o00wTBFg WSxZeeQFsgBQk3VGZc54awt+JZAp0D/HBjNn4ztT3LUyFgSp6spXYwaen5FBP7fZJKGS qafYhCHuq7PQ91waWlJrBOJQzhZ2f/m3RxgG10JJbGASTXroik3X4fOxlHxHaK4AdEjm ARRs1elwCwiOWRU7pwdzI2wJEuuvXIXm7882WUgbt/94lZdrh+dvY62JyRUfJpxDSI1Q dZm5U3NIEoy67vmGwi2tGeU1pXcwMq2HwrkjM6Hh76IMVETJ/9wuQwJYufIai3D2N2QE CFcw== X-Gm-Message-State: AG10YOQ0egn3lyb9bnPlBAj8QySw1inHLtiCcmXAj4muvLQ+p+7lKQlGaayH9yLFWKylZCa3R9Q= X-Received: by 10.25.22.214 with SMTP id 83mr10619222lfw.2.1454912431813; Sun, 07 Feb 2016 22:20:31 -0800 (PST) Received: from localhost.localdomain (ppp91-76-173-134.pppoe.mtu-net.ru. [91.76.173.134]) by smtp.gmail.com with ESMTPSA id k70sm3096591lfg.5.2016.02.07.22.20.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 07 Feb 2016 22:20:31 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 8 Feb 2016 09:20:25 +0300 Message-Id: <1454912425-14888-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] validation: pktio check for number of interfaces 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" CI got following error: pktio.c: In function 'pktio_test_recv_queue': pktio.c:643:11: error: 'pktio[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] pktio_tx = pktio[0] That can never happen due to num_ifaces always > 1 in our test. Add special check for that to make new gcc happy. Signed-off-by: Maxim Uvarov Reviewed-by: Christophe Milard --- I can not reproduce that warning. But this patch should to remove it. Maxim. test/validation/pktio/pktio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index 980b092..f3577ec 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -611,6 +611,8 @@ void pktio_test_recv_queue(void) int ret; int i; + CU_ASSERT_FATAL(num_ifaces >= 1); + /* Open and configure interfaces */ for (i = 0; i < num_ifaces; ++i) { pktio[i] = create_pktio(i, ODP_PKTIN_MODE_DIRECT,