Commit ad32a1f3 authored by Colin Ian King's avatar Colin Ian King Committed by Richard Weinberger

um: use %lx format specifiers for unsigned longs

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 0834f9cc
...@@ -109,7 +109,7 @@ unsigned long os_get_top_address(void) ...@@ -109,7 +109,7 @@ unsigned long os_get_top_address(void)
exit(1); 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 ... "); printf("Locating the top of the address space ... ");
fflush(stdout); fflush(stdout);
...@@ -134,7 +134,7 @@ unsigned long os_get_top_address(void) ...@@ -134,7 +134,7 @@ unsigned long os_get_top_address(void)
exit(1); exit(1);
} }
top <<= UM_KERN_PAGE_SHIFT; top <<= UM_KERN_PAGE_SHIFT;
printf("0x%x\n", top); printf("0x%lx\n", top);
return top; return top;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment