diff options
author | dim <dim@FreeBSD.org> | 2017-03-15 19:50:58 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2017-03-15 19:50:58 +0000 |
commit | 989ceb44343edd2f647750d63732d1106ee80e31 (patch) | |
tree | 94ca489f70ca6903f8371e8c15123ff05b2573e3 | |
parent | cfb2f31c4e64b6243b794869a793b30ce22f8df4 (diff) | |
download | FreeBSD-src-989ceb44343edd2f647750d63732d1106ee80e31.zip FreeBSD-src-989ceb44343edd2f647750d63732d1106ee80e31.tar.gz |
MFC r310232:
After r310171, the kernel version of sscanf() has format string checking
enabled. This results in a -Werror warning in mlx4ib:
sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c:90:22: error: format specifies type 'unsigned long long *' but the argument has type 'u64 *' (aka 'unsigned long *') [-Werror,-Wformat]
sscanf(buf, "%llx", &sysadmin_ag_val);
~~~~ ^~~~~~~~~~~~~~~~
Change sysadmin_ag_val to unsigned long long to avoid the warning.
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D8831
-rw-r--r-- | sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c b/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c index 6837b86..7968b16 100644 --- a/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c +++ b/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c @@ -79,7 +79,7 @@ static ssize_t store_admin_alias_guid(struct device *dev, container_of(attr, struct mlx4_ib_iov_sysfs_attr, dentry); struct mlx4_ib_iov_port *port = mlx4_ib_iov_dentry->ctx; struct mlx4_ib_dev *mdev = port->dev; - u64 sysadmin_ag_val; + unsigned long long sysadmin_ag_val; record_num = mlx4_ib_iov_dentry->entry_num / 8; guid_index_in_rec = mlx4_ib_iov_dentry->entry_num % 8; |