From patchwork Wed Oct 20 07:46:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng, ZhihongX" X-Patchwork-Id: 102358 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6EACBA0C45; Wed, 20 Oct 2021 09:47:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F6A141183; Wed, 20 Oct 2021 09:47:30 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id BEE1641190 for ; Wed, 20 Oct 2021 09:47:26 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10142"; a="228989276" X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="228989276" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 00:47:26 -0700 X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="594553994" Received: from unknown (HELO localhost.localdomain) ([10.240.183.65]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 00:47:21 -0700 From: zhihongx.peng@intel.com To: david.marchand@redhat.com, thomas@monjalon.net, anatoly.burakov@intel.com, konstantin.ananyev@intel.com, stephen@networkplumber.org, cristian.dumitrescu@intel.com, john.mcnamara@intel.com, bruce.richardson@intel.com Cc: dev@dpdk.org, xueqin.lin@intel.com, Zhihong Peng Date: Wed, 20 Oct 2021 15:46:42 +0800 Message-Id: <20211020074643.3004385-3-zhihongx.peng@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020074643.3004385-1-zhihongx.peng@intel.com> References: <20211019151524.2005442-4-zhihongx.peng@intel.com> <20211020074643.3004385-1-zhihongx.peng@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v13 3/4] code changes to avoid the ASan error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Zhihong Peng Code changes to avoid the following ASan error: "Control reaches end of non-void function". Signed-off-by: Xueqin Lin Signed-off-by: Zhihong Peng Acked-by: Cristian Dumitrescu --- v7: no change. v8: no change. v9: Modify the submit log. v10:no change. v11:no change. v12:Modify the commit log. v13:Modify the commit log. --- 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 *