Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Paolo 'Blaisorblade' Giarrusso and committed by
Linus Torvalds
6dad2d3f f2ea3940

+3 -2
+2 -1
arch/um/drivers/cow_user.c
··· 210 210 211 211 err = -EINVAL; 212 212 if(strlen(backing_file) > sizeof(header->backing_file) - 1){ 213 + /* Below, %zd is for a size_t value */ 213 214 cow_printf("Backing file name \"%s\" is too long - names are " 214 - "limited to %d characters\n", backing_file, 215 + "limited to %zd characters\n", backing_file, 215 216 sizeof(header->backing_file) - 1); 216 217 goto out_free; 217 218 }
+1 -1
arch/um/drivers/mconsole_kern.c
··· 615 615 return; 616 616 617 617 while(1){ 618 - n = min((size_t)len, ARRAY_SIZE(console_buf) - console_index); 618 + n = min((size_t) len, ARRAY_SIZE(console_buf) - console_index); 619 619 strncpy(&console_buf[console_index], string, n); 620 620 console_index += n; 621 621 string += n;