From: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: [PATCH 5/7] 32-bit compiler warning fix
Date: Sun, 7 Aug 2011 20:03:47 +0200 [thread overview]
Message-ID: <201108072003.47863.bvanassche@acm.org> (raw)
In-Reply-To: <201108072000.16383.bvanassche-HInyCGIudOg@public.gmane.org>
Avoid that the code in src/memory.c triggers a compiler warning when compiled
on a 32-bit system.
Signed-off-by: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
---
src/memory.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/memory.c b/src/memory.c
index faa43f3..9f13774 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -44,6 +44,7 @@
#include <string.h>
#include <dirent.h>
#include <limits.h>
+#include <inttypes.h>
#include "ibverbs.h"
@@ -116,7 +117,7 @@ static unsigned long get_page_size(void *base)
int n;
uintptr_t range_start, range_end;
- n = sscanf(buf, "%lx-%lx", &range_start, &range_end);
+ n = sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, &range_start, &range_end);
if (n < 2)
continue;
--
1.7.3.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 prev parent reply other threads:[~2011-08-07 18:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-07 18:00 [PATCH 0/7] Various libibverbs patches Bart Van Assche
[not found] ` <201108072000.16383.bvanassche-HInyCGIudOg@public.gmane.org>
2011-08-07 18:01 ` [PATCH 1/7] Add "foreign" option to AM_INIT_AUTOMAKE Bart Van Assche
2011-08-07 18:01 ` [PATCH 2/7] Makefile.am: Fix an automake warning Bart Van Assche
2011-08-07 18:02 ` [PATCH 3/7] autogen.sh: Introduce autoreconf Bart Van Assche
2011-08-07 18:03 ` [PATCH 4/7] .gitignore: Ignore files generated by the autotools Bart Van Assche
2011-08-07 18:03 ` Bart Van Assche [this message]
2011-08-07 18:04 ` [PATCH 6/7] Fix a compiler warning about an unused function Bart Van Assche
2011-08-07 18:05 ` [PATCH 7/7] Fix a compiler warning related to NVALGRIND Bart Van Assche
2011-08-09 11:08 ` [PATCH 0/7] Various libibverbs patches Roland Dreier
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=201108072003.47863.bvanassche@acm.org \
--to=bvanassche-hinycgiudog@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@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