From: Jonathan Rosser <jonathan.rosser-gjMux1o1B1/QXOPxS62xeg@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] librdmacm: fix compiler warning of void* arithmetic
Date: Fri, 22 Oct 2010 11:00:22 +0100 [thread overview]
Message-ID: <i9rnbn$f9o$1@dough.gmane.org> (raw)
Arithmetic on void* pointers generates a compiler warning, and projects
that include rdma/rdma_verbs.h and compile with -Werror -Wall will fail
to build.
---
include/rdma/rdma_verbs.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/rdma/rdma_verbs.h b/include/rdma/rdma_verbs.h
index d75d906..853ef9b 100644
--- a/include/rdma/rdma_verbs.h
+++ b/include/rdma/rdma_verbs.h
@@ -160,7 +160,7 @@ rdma_post_recv(struct rdma_cm_id *id, void *context,
void *addr,
{
struct ibv_sge sge;
- assert((addr >= mr->addr) && ((addr + length) <= (mr->addr +
mr->length)));
+ assert((addr >= mr->addr) && (((uint8_t*)addr + length) <=
((uint8_t*)mr->addr + mr->length)));
sge.addr = (uint64_t) (uintptr_t) addr;
sge.length = (uint32_t) length;
sge.lkey = mr->lkey;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2010-10-22 10:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 10:00 Jonathan Rosser [this message]
2010-10-22 10:25 ` [PATCH] librdmacm: fix compiler warning of void* arithmetic Andrea Gozzelino
2010-10-25 9:52 ` Jonathan Rosser
2010-11-01 17:04 ` Hefty, Sean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='i9rnbn$f9o$1@dough.gmane.org' \
--to=jonathan.rosser-gjmux1o1b1/qxopxs62xeg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox