[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231027045138.GJ3803936@pengutronix.de>
Date: Fri, 27 Oct 2023 06:51:38 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com
Subject: Re: [PATCH net-next] net: selftests: use ethtool_sprintf()
On Wed, Oct 25, 2023 at 07:29:16PM -0700, Jakub Kicinski wrote:
> During a W=1 build GCC 13.2 says:
>
> net/core/selftests.c: In function ‘net_selftest_get_strings’:
> net/core/selftests.c:404:52: error: ‘%s’ directive output may be truncated writing up to 279 bytes into a region of size 28 [-Werror=format-truncation=]
> 404 | snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
> | ^~
> net/core/selftests.c:404:17: note: ‘snprintf’ output between 5 and 284 bytes into a destination of size 32
> 404 | snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 405 | net_selftests[i].name);
> | ~~~~~~~~~~~~~~~~~~~~~~
>
> avoid it by using ethtool_sprintf().
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: o.rempel@...gutronix.de
Reviewed-by: Oleksij Rempel <o.rempel@...gutronix.de>
Tested-by: Oleksij Rempel <o.rempel@...gutronix.de>
Thank you!
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists