public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: mmarek@suse.cz
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH] Kbuild, lto: Avoid reported warning with strtoul
Date: Fri, 18 Apr 2014 06:35:56 +0200	[thread overview]
Message-ID: <1397795756-23283-1-git-send-email-andi@firstfloor.org> (raw)

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


             reply	other threads:[~2014-04-18  4:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18  4:35 Andi Kleen [this message]
2014-04-18  4:49 ` [PATCH] Kbuild, lto: Avoid reported warning with strtoul 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397795756-23283-1-git-send-email-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox