lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 28 Sep 2021 12:32:32 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Andreas Noever <andreas.noever@...il.com>,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Isaac Hazan <isaac.hazan@...el.com>,
        Lee Jones <lee.jones@...aro.org>,
        Rikard Falkeborn <rikard.falkeborn@...il.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] thunderbolt: fix -Wrestrict warning

On Mon, Sep 27, 2021 at 03:16:11PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> gcc-11 warns when building with W=1:
> 
> drivers/thunderbolt/xdomain.c: In function 'modalias_show':
> drivers/thunderbolt/xdomain.c:733:16: error: 'sprintf' argument 3 overlaps destination object 'buf' [-Werror=restrict]
>   733 |         return sprintf(buf, "%s\n", buf);
>       |                ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/thunderbolt/xdomain.c:727:36: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
>   727 |                              char *buf)
>       |                              ~~~~~~^~~
> 
> There is no need for the sprintf() here when a strcat() does
> the same thing.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ