]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async/rdma: set/get silence warning 26581/head
authorKefu Chai <kchai@redhat.com>
Fri, 22 Feb 2019 05:18:48 +0000 (13:18 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 22 Feb 2019 05:41:25 +0000 (13:41 +0800)
commit8991c73c6b26569d9226abbecbd04ad450c9388a
tree00177837a6c5a25458dabbf5f73b0677538349b9
parent992962867044d3c5dfabd03534fe24e5788d58c7
msg/async/rdma: set/get silence warning

functions like gid_to_wire_gid() is not aware of the alignment of the
IBSYNMsg, so we should pass the enclosing structure to it.

to silence warnings like:

ceph/src/msg/async/rdma/Infiniband.cc: In member function ‘int
Infiniband::send_msg(CephContext*, int, IBSYNMsg&)’:
ssd/ceph/src/msg/async/rdma/Infiniband.cc:1123:19: warning: taking
address of packed member of ‘IBSYNMsg’ may result in an unaligned
pointer value [-Waddress-of-packed-
member]
 1123 |   gid_to_wire_gid(&(im.gid), gid);
      |                   ^~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/async/rdma/Infiniband.cc
src/msg/async/rdma/Infiniband.h