public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Kbuild, lto: Avoid reported warning with strtoul
@ 2014-04-18  4:35 Andi Kleen
  2014-04-18  4:49 ` Al Viro
  2014-04-21  4:55 ` Viresh Kumar
  0 siblings, 2 replies; 6+ messages in thread
From: Andi Kleen @ 2014-04-18  4:35 UTC (permalink / raw)
  To: mmarek; +Cc: hpa, linux-kernel, Andi Kleen, Viresh Kumar

From: Andi Kleen <ak@linux.intel.com>

Apparently someone's C library declares strtoul with warn_unused_result.
Cast to void to avoid the warning. Error handling is not useful here.

Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 scripts/mod/modpost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0663556..b9cf439 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1707,7 +1707,7 @@ static char *remove_dot(char *s)
 	int n = strcspn(s, ".");
 
 	if (n > 0 && s[n] != 0) {
-		strtoul(s + n + 1, &end, 10);
+		(void)strtoul(s + n + 1, &end, 10);
 		if  (end > s + n + 1 && (*end == '.' || *end == 0))
 			s[n] = 0;
 	}
-- 
1.8.5.2


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

end of thread, other threads:[~2014-04-22  4:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18  4:35 [PATCH] Kbuild, lto: Avoid reported warning with strtoul Andi Kleen
2014-04-18  4:49 ` Al Viro
2014-04-18 13:38   ` Andi Kleen
2014-04-21  4:55 ` Viresh Kumar
2014-04-21 16:50   ` Andi Kleen
2014-04-22  4:19     ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox