From 1f5607c527e20e79bc49dcb98fe1ca29995749d1 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 18 Nov 2024 14:03:26 +0100 Subject: [PATCH] ras-page-isolation: drop an unused variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's no need to store the value of strtoul() during the overflow check. Remove it, as this is causing a warning: ras-page-isolation.c: In function ‘parse_isolation_env’: ras-page-isolation.c:166:47: warning: unused variable ‘converted_value’ [-Wunused-variable] 166 | unsigned long converted_value = strtoul(config->env, &endptr, 10); | ^~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab --- ras-page-isolation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ras-page-isolation.c b/ras-page-isolation.c index 0ea36f6..6fc7c4c 100644 --- a/ras-page-isolation.c +++ b/ras-page-isolation.c @@ -163,7 +163,8 @@ static void parse_isolation_env(struct isolation *config) */ if (units->val == 1) { char *endptr; - unsigned long converted_value = strtoul(config->env, &endptr, 10); + + strtoul(config->env, &endptr, 10); if (errno == ERANGE || *endptr != '\0') config->overflow = true; }