Thread (1 message) 1 message, 1 author, 2011-08-07
DORMANTno replies

[PATCH 5/7] 32-bit compiler warning fix

From: Bart Van Assche <hidden>
Date: 2011-08-07 18:03:47
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help