linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] um: use %lx format specifiers for unsigned longs
@ 2016-01-23 19:17 Colin King
  2016-01-27 21:15 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-01-23 19:17 UTC (permalink / raw)
  To: Jeff Dike, Richard Weinberger, Thomas Gleixner, Ingo Molnar, x86,
	user-mode-linux-devel, user-mode-linux-user
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

static analysis from cppcheck detected %x being used for
unsigned longs:

[arch/x86/um/os-Linux/task_size.c:112]: (warning) %x in format
  string (no. 1) requires 'unsigned int' but the argument type
  is 'unsigned long'.

Use %lx instead of %x

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 arch/x86/um/os-Linux/task_size.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/um/os-Linux/task_size.c b/arch/x86/um/os-Linux/task_size.c
index 8502ad3..5adb6a2 100644
--- a/arch/x86/um/os-Linux/task_size.c
+++ b/arch/x86/um/os-Linux/task_size.c
@@ -109,7 +109,7 @@ unsigned long os_get_top_address(void)
 		exit(1);
 	}
 
-	printf("0x%x\n", bottom << UM_KERN_PAGE_SHIFT);
+	printf("0x%lx\n", bottom << UM_KERN_PAGE_SHIFT);
 	printf("Locating the top of the address space ... ");
 	fflush(stdout);
 
@@ -134,7 +134,7 @@ out:
 		exit(1);
 	}
 	top <<= UM_KERN_PAGE_SHIFT;
-	printf("0x%x\n", top);
+	printf("0x%lx\n", top);
 
 	return top;
 }
-- 
2.7.0.rc3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-27 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23 19:17 [PATCH] um: use %lx format specifiers for unsigned longs Colin King
2016-01-27 21:15 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).