From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DB81EA0C41;
	Thu, 30 Sep 2021 07:37:05 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 33B6E41104;
	Thu, 30 Sep 2021 07:37:02 +0200 (CEST)
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by mails.dpdk.org (Postfix) with ESMTP id 96DF8410E5;
 Thu, 30 Sep 2021 07:36:57 +0200 (CEST)
X-IronPort-AV: E=McAfee;i="6200,9189,10122"; a="205252086"
X-IronPort-AV: E=Sophos;i="5.85,335,1624345200"; d="scan'208";a="205252086"
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 29 Sep 2021 22:36:57 -0700
X-IronPort-AV: E=Sophos;i="5.85,335,1624345200"; d="scan'208";a="555449778"
Received: from unknown (HELO localhost.localdomain) ([10.240.183.65])
 by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 29 Sep 2021 22:36:54 -0700
From: zhihongx.peng@intel.com
To: anatoly.burakov@intel.com, konstantin.ananyev@intel.com,
 stephen@networkplumber.org
Cc: dev@dpdk.org, xueqin.lin@intel.com, Zhihong Peng <zhihongx.peng@intel.com>,
 stable@dpdk.org
Date: Thu, 30 Sep 2021 05:27:24 +0000
Message-Id: <20210930052724.195414-2-zhihongx.peng@intel.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20210930052724.195414-1-zhihongx.peng@intel.com>
References: <20210924100310.4278-1-zhihongx.peng@intel.com>
 <20210930052724.195414-1-zhihongx.peng@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH v6 2/2] lib/pipeline: Fix gcc compilation error
 using ASan
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

From: Zhihong Peng <zhihongx.peng@intel.com>

After adding ASan, the gcc compilation check will be stricter.
"Control reaches end of non-void function" error occurs here.

Fixes: f38913b7fb8e (pipeline: add meter array to SWX)
Cc: stable@dpdk.org

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 1cd09a4b44..0acd6c6752 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -4642,7 +4642,7 @@ instr_meter_translate(struct rte_swx_pipeline *p,
 		return 0;
 	}
 
-	CHECK(0, EINVAL);
+	return -EINVAL;
 }
 
 static inline void
@@ -5937,7 +5937,7 @@ instr_translate(struct rte_swx_pipeline *p,
 					      instr,
 					      data);
 
-	CHECK(0, EINVAL);
+	return -EINVAL;
 }
 
 static struct instruction_data *
-- 
2.25.1