MIPS: Loongson: add return value check for strict_strtoul()
PATCH 1/1 MIPS: Loongson: add return value check for strict_strtoul()
cc1: warnings being treated as errorsarch/mips/loongson/common/env.c: In function 'prom_init_env':arch/mips/loongson/common/env.c:49: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result arch/mips/loongson/common/env.c:50: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result arch/mips/loongson/common/env.c:51: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result arch/mips/loongson/common/env.c:52: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result
Signed-off-by Wu Zhangjin <[email protected]>
--- arch/mips/loongson/common/env.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/loongson/common/env.c +2 -2
@@ -29,9 +29,9 @@ unsigned long memsize, highmemsize;#define parse_even_earlier (res, option, p) \ do { \ + int ret; \ if (strncmp(option, (char *)p, strlen(option)) == 0) \ - strict_strtol((char *)p + strlen(option"="), \ - 10, &res); \ + ret = strict_strtol((char *)p + strlen(option"="), 10, &res); \ } while (0)void __init prom_init_env (void )
Signature · 1 line
1.7.1
Thanks Wu, applied!
Ralf