Message ID | 201108072003.47863.bvanassche@acm.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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;
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@acm.org> --- src/memory.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)