From e3f943d0974bee65c8ab6ca16eff541a20a4fc5e Mon Sep 17 00:00:00 2001
From: Wenkai Lin <linwenkai6@hisilicon.com>
Date: Sat, 23 Jul 2022 16:50:29 +0800
Subject: [PATCH 162/183] uadk: fix macro argument warning

macro argument 'array' should be enclosed in parentheses.

Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
---
 include/wd_util.h | 4 ++--
 v1/wd_ecc.c       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/wd_util.h b/include/wd_util.h
index 83a9684..83ac5f8 100644
--- a/include/wd_util.h
+++ b/include/wd_util.h
@@ -18,8 +18,8 @@ extern "C" {
 #endif
 
 #define FOREACH_NUMA(i, config, config_numa) \
-	for (i = 0, config_numa = config->config_per_numa; \
-	     i < config->numa_num; config_numa++, i++)
+	for ((i) = 0, (config_numa) = (config)->config_per_numa; \
+	     (i) < (config)->numa_num; (config_numa)++, (i)++)
 
 struct wd_async_msg_pool {
 	struct msg_pool *pools;
diff --git a/v1/wd_ecc.c b/v1/wd_ecc.c
index d3f6694..dae5e23 100644
--- a/v1/wd_ecc.c
+++ b/v1/wd_ecc.c
@@ -37,7 +37,7 @@
 #define ECC_MAX_OUT_NUM			4
 #define CURVE_PARAM_NUM			6
 #define ECC_POINT_NUM			2
-#define WD_ARRAY_SIZE(array)		(sizeof(array) / sizeof(array[0]))
+#define WD_ARRAY_SIZE(array)		(sizeof(array) / sizeof((array)[0]))
 #define MAX_CURVE_SIZE			(ECC_MAX_KEY_SIZE * CURVE_PARAM_NUM)
 #define MAX_HASH_LENS			ECC_MAX_KEY_SIZE
 #define SM2_KEY_SIZE			32
-- 
2.27.0

