summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2006-04-10 22:53:31 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 06:18:35 -0700
commit6dad2d3faac21d487ffd1d15268b1802feeb3e72 (patch)
tree617f14deb02c1ab8911c630df0c990a55a67721f /arch
parentf2ea394082c5d1682e6a131c5981085b8752c6e9 (diff)
downloadlinux-3.10-6dad2d3faac21d487ffd1d15268b1802feeb3e72.tar.gz
linux-3.10-6dad2d3faac21d487ffd1d15268b1802feeb3e72.tar.bz2
linux-3.10-6dad2d3faac21d487ffd1d15268b1802feeb3e72.zip
[PATCH] uml: fix 2 harmless cast warnings for 64-bit
Fix two harmless warnings in 64-bit compilation (the 2nd doesn't trigger for now because of a missing __attribute((format)) for cow_printf, but next patches fix that). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/cow_user.c3
-rw-r--r--arch/um/drivers/mconsole_kern.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c
index a9afccf68e3..0ec4052db9c 100644
--- a/arch/um/drivers/cow_user.c
+++ b/arch/um/drivers/cow_user.c
@@ -210,8 +210,9 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
err = -EINVAL;
if(strlen(backing_file) > sizeof(header->backing_file) - 1){
+ /* Below, %zd is for a size_t value */
cow_printf("Backing file name \"%s\" is too long - names are "
- "limited to %d characters\n", backing_file,
+ "limited to %zd characters\n", backing_file,
sizeof(header->backing_file) - 1);
goto out_free;
}
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 1646f396056..09f1c140a76 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -615,7 +615,7 @@ static void console_write(struct console *console, const char *string,
return;
while(1){
- n = min((size_t)len, ARRAY_SIZE(console_buf) - console_index);
+ n = min((size_t) len, ARRAY_SIZE(console_buf) - console_index);
strncpy(&console_buf[console_index], string, n);
console_index += n;
string += n;