Skip to content

Commit

Permalink
eal/linux: remove unused variable for socket memory
Browse files Browse the repository at this point in the history
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: 0a703f0 ("eal/linux: fix parsing zero socket memory and limits")

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
jimharris authored and david-marchand committed Nov 4, 2021
1 parent 11c5b9b commit 628bac7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/eal/linux/eal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 628bac7

Please sign in to comment.