Re: [PATCH] net/mlx5: fix build with clang 14

2022-06-10 Thread Bruce Richardson
On Wed, May 18, 2022 at 11:11:00AM +0200, David Marchand wrote: > clang 14 raises the following warning: > > ../drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error: 'fscanf' > may overflow; destination buffer in argument 3 has size 16, but the > corresponding specifier may require size

[PATCH] net/mlx5: fix build with clang 14

2022-05-18 Thread David Marchand
clang 14 raises the following warning: ../drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error: 'fscanf' may overflow; destination buffer in argument 3 has size 16, but the corresponding specifier may require size 17 [-Werror,-Wfortify-source] ret = fscanf(file, "%" R

Re: [PATCH] net/mlx5: fix build with clang 14

2022-05-11 Thread David Marchand
On Wed, May 11, 2022 at 3:59 PM Ali Alnubani wrote: > > Use fgets instead of fscanf to resolve the following warning > reported by clang 14.0.0 in Fedora 37 (Rawhide): > > drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error: > 'fscanf' may overflow; destination buffer in argument 3 has size 1

[PATCH] net/mlx5: fix build with clang 14

2022-05-11 Thread Ali Alnubani
Use fgets instead of fscanf to resolve the following warning reported by clang 14.0.0 in Fedora 37 (Rawhide): drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error: 'fscanf' may overflow; destination buffer in argument 3 has size 16, but the corresponding specifier may require size 17 [-Wer