Skip to content

Commit

Permalink
ras-page-isolation: drop an unused variable
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mchehab committed Nov 18, 2024
1 parent 683feac commit 1f5607c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ras-page-isolation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1f5607c

Please sign in to comment.