From: Joe Perches <joe@perches.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Hans de Goede <hdegoede@redhat.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
linux-gpio@vger.kernel.org,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning
Date: Wed, 06 Sep 2017 16:42:10 -0700 [thread overview]
Message-ID: <1504741330.7546.6.camel@perches.com> (raw)
In-Reply-To: <CAK8P3a2RGZFc3_XpgyfuxwYy-vOoYkkamxQzma8JKwLjCCJasQ@mail.gmail.com>
On Wed, 2017-09-06 at 21:53 +0200, Arnd Bergmann wrote:
> On Wed, Sep 6, 2017 at 5:52 PM, Joe Perches <joe@perches.com> wrote:
> > On Wed, 2017-09-06 at 17:47 +0200, Arnd Bergmann wrote:
> > > As suggested by Andy, this changes the format string to have a fixed length.
> > > Since modifying the range check did not help, I also opened a bug against
> > > gcc, see link below.
> >
> > The code has
> >
> > int pin
> >
> > does changing pin to unsigned int matter?
>
> No difference, see also the gcc bugzilla report.
Perhaps the bug report does not apply here as the
function is casting a unsigned int to an int through
a pointer when the int could now be negative, the int
is tested for < 256 and is then printed.
next prev parent reply other threads:[~2017-09-06 23:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 15:47 [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning Arnd Bergmann
2017-09-06 15:52 ` Joe Perches
2017-09-06 19:53 ` Arnd Bergmann
2017-09-06 23:42 ` Joe Perches [this message]
2017-09-07 6:50 ` Mika Westerberg
2017-09-12 9:26 ` Linus Walleij
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=1504741330.7546.6.camel@perches.com \
--to=joe@perches.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=weiyongjun1@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).