Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727825

Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning
Date 2017-09-07 01:50 +0200
Message-ID <umSeZ-dZ-7@gated-at.bofh.it> (permalink)
References <umKKt-3MF-11@gated-at.bofh.it> <umKU9-3Qp-11@gated-at.bofh.it> <umOEq-6jL-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning Arnd Bergmann <arnd@arndb.de> - 2017-09-06 17:50 +0200
  Re: [PATCH] gpio: acpi: work around false-positive  -Wstring-overflow warning Joe Perches <joe@perches.com> - 2017-09-06 18:00 +0200
    Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow warning Arnd Bergmann <arnd@arndb.de> - 2017-09-06 22:00 +0200
      Re: [PATCH] gpio: acpi: work around false-positive  -Wstring-overflow warning Joe Perches <joe@perches.com> - 2017-09-07 01:50 +0200
  Re: [PATCH] gpio: acpi: work around false-positive -Wstring-overflow  warning Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-07 09:00 +0200

csiph-web