提交 6dad2d3f 编写于 作者: P Paolo 'Blaisorblade' Giarrusso 提交者: Linus Torvalds

[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: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 f2ea3940
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册