WSL2-Linux-Kernel/drivers/infiniband/hw/mlx4
Leon Romanovsky 9189c23067 RDMA/mlx4: Fix truncated output warning in alias_GUID.c
[ Upstream commit 5953e0647cec703ef436ead37fed48943507b433 ]

drivers/infiniband/hw/mlx4/alias_GUID.c: In function ‘mlx4_ib_init_alias_guid_service’:
drivers/infiniband/hw/mlx4/alias_GUID.c:878:74: error: ‘%d’ directive
output may be truncated writing between 1 and 11 bytes into a region of
size 5 [-Werror=format-truncation=]
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                                                                          ^~
drivers/infiniband/hw/mlx4/alias_GUID.c:878:63: note: directive argument in the range [-2147483641, 2147483646]
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                                                               ^~~~~~~~~~~~~~
drivers/infiniband/hw/mlx4/alias_GUID.c:878:17: note: ‘snprintf’ output
between 12 and 22 bytes into a destination of size 15
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fixes: a0c64a17ab ("mlx4: Add alias_guid mechanism")
Link: https://lore.kernel.org/r/1951c9500109ca7e36dcd523f8a5f2d0d2a608d1.1718554641.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:45:05 +02:00
..
Kconfig
Makefile
ah.c
alias_GUID.c RDMA/mlx4: Fix truncated output warning in alias_GUID.c 2024-08-19 05:45:05 +02:00
cm.c
cq.c
doorbell.c
mad.c RDMA/mlx4: Fix truncated output warning in mad.c 2024-08-19 05:45:05 +02:00
main.c RDMA/mlx4: Don't continue event handler after memory allocation failure 2022-02-08 18:34:07 +01:00
mcg.c
mlx4_ib.h
mr.c IB: Set IOVA/LENGTH on IB_MR in core/uverbs layers 2022-10-26 12:35:13 +02:00
qp.c RDMA/mlx4: Make check for invalid flags stricter 2023-08-03 10:22:37 +02:00
srq.c
sysfs.c IB/mlx4: Fix the size of a buffer in add_port_entries() 2023-10-10 21:59:09 +02:00