Jakub Kicinski 79fa29570b net: selftests: use ethtool_sprintf()
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().

Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20231026022916.566661-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-10-27 08:09:26 -07:00
..
2023-10-23 08:45:25 +01:00
2023-10-01 19:09:54 +01:00
2023-05-31 13:06:57 +02:00
2023-10-23 16:16:51 -07:00
2023-08-29 17:39:15 -07:00
2023-10-27 10:35:46 +01:00
2023-10-27 10:35:46 +01:00
2023-10-26 20:27:58 -07:00
2023-06-24 15:41:46 -07:00
2023-10-01 19:09:54 +01:00
2023-06-28 16:43:10 -07:00
2023-10-26 20:27:58 -07:00
2023-10-01 19:09:54 +01:00
2023-10-11 10:39:01 +01:00