DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jim Harris <james.r.harris@intel.com>
To: dev@dpdk.org
Cc: Jim Harris <james.r.harris@intel.com>
Subject: [dpdk-dev] [PATCH] eal: fix unused-but-set-variable error
Date: Fri, 29 Oct 2021 17:14:10 +0000	[thread overview]
Message-ID: <20211029171410.330128-1-james.r.harris@intel.com> (raw)

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.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
---
 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.32.0


             reply	other threads:[~2021-10-29 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 17:14 Jim Harris [this message]
2021-10-29 18:48 ` David Marchand
2021-11-04 12:19   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211029171410.330128-1-james.r.harris@intel.com \
    --to=james.r.harris@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).