]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
sync/rdma: Remove warning 13142/head
authorSarit Zubakov <saritz@mellanox.com>
Mon, 16 Jan 2017 08:53:28 +0000 (08:53 +0000)
committerAdir Lev <adirl@mellanox.com>
Thu, 26 Jan 2017 19:12:03 +0000 (21:12 +0200)
Fixed warning - of sending unsigned short int to %x

issue: 944710

Change-Id: I2820e8da77467a4a645d9653b4964e7a2198656b
Signed-off-by: Sarit Zubakov <saritz@mellanox.com>
src/msg/async/rdma/Infiniband.cc

index e6d9cd297da5d0bb08077507aefbcefb1364b8b4..8e6418e2721d8ddc313a62c477dc66e6b1811c9d 100644 (file)
@@ -880,10 +880,7 @@ 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
-    int tmp;
-
-    sscanf(msg, "%x:%x:%x:%x:%s", &tmp, &(im.qpn), &(im.psn), &(im.peer_qpn),gid);
-    im.lid = tmp;
+    sscanf(msg, "%hu:%x:%x:%x:%s", &(im.lid), &(im.qpn), &(im.psn), &(im.peer_qpn),gid);
     wire_gid_to_gid(gid, &(im.gid));
     ldout(cct, 5) << __func__ << " recevd: " << im.lid << ", " << im.qpn << ", " << im.psn << ", " << im.peer_qpn << ", " << gid  << dendl;
   }