All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Loongson: add return value check for strict_strtoul()
@ 2010-11-08 13:25 Wu Zhangjin
  2010-11-08 21:36 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Wu Zhangjin @ 2010-11-08 13:25 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, Wu Zhangjin

cc1: warnings being treated as errors
arch/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 <wuzhangjin@gmail.com>
---
 arch/mips/loongson/common/env.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
index ae4cff9..11b193f 100644
--- a/arch/mips/loongson/common/env.c
+++ b/arch/mips/loongson/common/env.c
@@ -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)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Loongson: add return value check for strict_strtoul()
  2010-11-08 13:25 [PATCH] MIPS: Loongson: add return value check for strict_strtoul() Wu Zhangjin
@ 2010-11-08 21:36 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2010-11-08 21:36 UTC (permalink / raw)
  To: Wu Zhangjin; +Cc: linux-mips

Thanks Wu, applied!

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-09  4:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08 13:25 [PATCH] MIPS: Loongson: add return value check for strict_strtoul() Wu Zhangjin
2010-11-08 21:36 ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.