]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
ras-page-isolation: drop an unused variable
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 13:03:26 +0000 (14:03 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 13:03:26 +0000 (14:03 +0100)
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 <mchehab+huawei@kernel.org>
ras-page-isolation.c

index 0ea36f67b1f485c7a3a00459f95236784ccc0bbc..6fc7c4ce71abba06c11229f4dcd208d9bc30c306 100644 (file)
@@ -163,7 +163,8 @@ parse:
                         */
                        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;
                        }