From 628bac7df18904c7083c8ad04669c69688f352de Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 29 Oct 2021 17:14:10 +0000 Subject: [PATCH] eal/linux: remove unused variable for socket memory clang-13 rightfully complains that the total_mem variable in eal_parse_socket_arg is set but not used, since the final accumulated total_mem result isn't used anywhere. So just remove the total_mem variable. Fixes: 0a703f0f36c1 ("eal/linux: fix parsing zero socket memory and limits") Signed-off-by: Jim Harris Reviewed-by: David Marchand --- lib/eal/linux/eal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 81fdebc6a0..60b4924838 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -562,7 +562,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) char * arg[RTE_MAX_NUMA_NODES]; char *end; int arg_num, i, len; - uint64_t total_mem = 0; len = strnlen(strval, SOCKET_MEM_STRLEN); if (len == SOCKET_MEM_STRLEN) { @@ -594,7 +593,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) (arg[i][0] == '\0') || (end == NULL) || (*end != '\0')) return -1; val <<= 20; - total_mem += val; socket_arg[i] = val; } -- 2.20.1