Messages in this thread | | | Date | Wed, 30 May 2018 13:18:59 -0400 (EDT) | Subject | Re: [PATCH, net-next] net: ethernet: freescale: fix false-positive string overflow warning | From | David Miller <> |
| |
From: Arnd Bergmann <arnd@arndb.de> Date: Mon, 28 May 2018 17:49:46 +0200
> While compile-testing on arm64 with gcc-8.1, I ran into a build diagnostic: ... > It appears this has never shown on ppc32 or arm32 for an unknown reason, but > now gcc fails to identify that the 'irq_cnt' loop index has an upper bound > of 3, and instead uses a bogus range. > > To work around the warning, this changes the sprintf to snprintf with the > correct buffer length. > > Fixes: 78cc6e7ef957 ("net: ethernet: freescale: Allow FEC with COMPILE_TEST") > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thanks Arnd.
| |