]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/rdma/infiniband: Silence memset warning
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 8 May 2018 23:26:28 +0000 (19:26 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 May 2018 13:30:35 +0000 (15:30 +0200)
Though it may be better in the long-run to replace the malloc-like
interface with an Allocator type interface.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 7fcfb60170e7cd293109c0c74ac1e4cdcd31b143)

src/msg/async/rdma/Infiniband.cc

index b99100139c70149403a3ae5d43e8fae75d3364aa..9ead47be8767a74726f3e1c1646231cc6ae8dfce 100644 (file)
@@ -584,7 +584,7 @@ int Infiniband::MemoryManager::Cluster::fill(uint32_t num)
   end = base + bytes;
   assert(base);
   chunk_base = static_cast<Chunk*>(::malloc(sizeof(Chunk) * num));
-  memset(chunk_base, 0, sizeof(Chunk) * num);
+  memset(static_cast<void*>(chunk_base), 0, sizeof(Chunk) * num);
   free_chunks.reserve(num);
   ibv_mr* m = ibv_reg_mr(manager.pd->pd, base, bytes, IBV_ACCESS_REMOTE_WRITE | IBV_ACCESS_LOCAL_WRITE);
   assert(m);