mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
RDMA: Fix compilation warning
Infiniband.cc: In member function ‘int Infiniband::recv_msg(CephContext*, int, IBSYNMsg&)’: Infiniband.cc:883:86: warning: format ‘%x’ expects argument of type ‘unsigned int*’, but argument 3 has type ‘uint16_t* {aka short unsigned int*}’ [-Wformat=] sscanf(msg, "%x:%x:%x:%x:%s", &(im.lid), &(im.qpn), &(im.psn), &(im.peer_qpn),gid); Signed-off-by: Amir Vadai <amir@vadai.me>
This commit is contained in:
parent
3662403e99
commit
194bc3cb5f
@ -880,7 +880,10 @@ int Infiniband::recv_msg(CephContext *cct, int sd, IBSYNMsg& im)
|
||||
ldout(cct, 1) << __func__ << " got bad length (" << r << "): " << cpp_strerror(errno) << dendl;
|
||||
r = -EINVAL;
|
||||
} else { // valid message
|
||||
sscanf(msg, "%x:%x:%x:%x:%s", &(im.lid), &(im.qpn), &(im.psn), &(im.peer_qpn),gid);
|
||||
int tmp;
|
||||
|
||||
sscanf(msg, "%x:%x:%x:%x:%s", &tmp, &(im.qpn), &(im.psn), &(im.peer_qpn),gid);
|
||||
im.lid = tmp;
|
||||
wire_gid_to_gid(gid, &(im.gid));
|
||||
ldout(cct, 5) << __func__ << " recevd: " << im.lid << ", " << im.qpn << ", " << im.psn << ", " << im.peer_qpn << ", " << gid << dendl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user