Skip to content

Commit ad32a1f

Browse files
Colin Ian Kingrichardweinberger
authored andcommitted
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: Colin Ian King <colin.king@canonical.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 0834f9c commit ad32a1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/um/os-Linux/task_size.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ unsigned long os_get_top_address(void)
109109
exit(1);
110110
}
111111

112-
printf("0x%x\n", bottom << UM_KERN_PAGE_SHIFT);
112+
printf("0x%lx\n", bottom << UM_KERN_PAGE_SHIFT);
113113
printf("Locating the top of the address space ... ");
114114
fflush(stdout);
115115

@@ -134,7 +134,7 @@ unsigned long os_get_top_address(void)
134134
exit(1);
135135
}
136136
top <<= UM_KERN_PAGE_SHIFT;
137-
printf("0x%x\n", top);
137+
printf("0x%lx\n", top);
138138

139139
return top;
140140
}

0 commit comments

Comments
 (0)