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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2017-09-06 at 21:53 +0200, Arnd Bergmann wrote:
> On Wed, Sep 6, 2017 at 5:52 PM, Joe Perches <joe@xxxxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux