[dpdk-stable] [PATCH v10 3/4] pipeline: Fix compilation error with gcc ASan

zhihongx.peng at intel.com zhihongx.peng at intel.com
Fri Oct 15 16:27:38 CEST 2021


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

The gcc will check code more stricter when ASan enabled.
"Control reaches end of non-void function" error occurs here.

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

Signed-off-by: Xueqin Lin <xueqin.lin at intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng at 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



More information about the stable mailing list