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 <bvanass...@acm.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to