From: Al Viro <viro@ZenIV.linux.org.uk>
To: Andi Kleen <andi@firstfloor.org>
Cc: mmarek@suse.cz, hpa@zytor.com, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH] Kbuild, lto: Avoid reported warning with strtoul
Date: Fri, 18 Apr 2014 05:49:04 +0100 [thread overview]
Message-ID: <20140418044904.GM18016@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1397795756-23283-1-git-send-email-andi@firstfloor.org>
On Fri, Apr 18, 2014 at 06:35:56AM +0200, Andi Kleen wrote:
> 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.
Umm... Since we don't give a fsck for the value, isn't that simply
char *p = strchr(s, '.');
if (p) {
size_t m = strspn(p + 1, "0123456789");
if (m > 0 && (p[m + 1] == '.' || p[m + 1] == '\0'))
*p = '\0';
}
next prev parent reply other threads:[~2014-04-18 4:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 4:35 [PATCH] Kbuild, lto: Avoid reported warning with strtoul Andi Kleen
2014-04-18 4:49 ` Al Viro [this message]
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=20140418044904.GM18016@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--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