Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315730 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2016-01-23 20:20 +0100 |
| Last post | 2016-01-27 22:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] um: use %lx format specifiers for unsigned longs Colin King <colin.king@canonical.com> - 2016-01-23 20:20 +0100
Re: [PATCH] um: use %lx format specifiers for unsigned longs Richard Weinberger <richard@nod.at> - 2016-01-27 22:20 +0100
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2016-01-23 20:20 +0100 |
| Subject | [PATCH] um: use %lx format specifiers for unsigned longs |
| Message-ID | <qUbT4-7kB-5@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Date | 2016-01-27 22:20 +0100 |
| Message-ID | <qVFFp-1hk-35@gated-at.bofh.it> |
| In reply to | #1315730 |
Am 23.01.2016 um 20:17 schrieb Colin King: > 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> Applied, Thanks! //richard
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web