RE: [PATCH] net/mlx5: fix build with GCC 12 and ASan

2023-03-15 Thread Slava Ovsiienko
Hi, I would prefer to fix both. With best regards, Slava > -Original Message- > From: David Marchand > Sent: среда, 15 марта 2023 г. 12:05 > To: Slava Ovsiienko > Cc: dev@dpdk.org; sta...@dpdk.org; Matan Azrad > Subject: Re: [PATCH] net/mlx5: fix build with GCC 1

Re: [PATCH] net/mlx5: fix build with GCC 12 and ASan

2023-03-15 Thread David Marchand
On Tue, Mar 14, 2023 at 2:00 PM Slava Ovsiienko wrote: > > Hi, David > > Thank you for the fix. > I see the quite similar strncpy() usage in mlx5_xstats_get_names() routine. > Does compiler complain about? Strangely.. no. But we could switch to strlcpy too. What is your preferrence? -- David M

RE: [PATCH] net/mlx5: fix build with GCC 12 and ASan

2023-03-14 Thread Slava Ovsiienko
rg > Cc: sta...@dpdk.org; Matan Azrad ; Slava Ovsiienko > > Subject: [PATCH] net/mlx5: fix build with GCC 12 and ASan > > Building with gcc 12 and ASan raises this warning: > > ../drivers/net/mlx5/mlx5_txpp.c: In function ‘mlx5_txpp_xstats_get_names’: > ../drivers/net/mlx5/

Re: [PATCH] net/mlx5: fix build with GCC 12 and ASan

2023-03-14 Thread David Marchand
On Thu, Mar 9, 2023 at 10:03 AM David Marchand wrote: > > Building with gcc 12 and ASan raises this warning: > > ../drivers/net/mlx5/mlx5_txpp.c: In function ‘mlx5_txpp_xstats_get_names’: > ../drivers/net/mlx5/mlx5_txpp.c:1066:25: error: ‘strncpy’ specified bound > 64 equals destination si

[PATCH] net/mlx5: fix build with GCC 12 and ASan

2023-03-09 Thread David Marchand
Building with gcc 12 and ASan raises this warning: ../drivers/net/mlx5/mlx5_txpp.c: In function ‘mlx5_txpp_xstats_get_names’: ../drivers/net/mlx5/mlx5_txpp.c:1066:25: error: ‘strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation] 1066 | s