diff options
author | Meelis Roos <mroos@linux.ee> | 2007-07-31 03:38:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:39:39 -0400 |
commit | aeb3f46252e26acdc60a1a8e31fb1ca6319d9a07 (patch) | |
tree | f17d1814b2db21290fdaa80180dd8d0c6dfb2b5b | |
parent | 60fd4d6a1953accd3d57f8e4f3b0f4692598bf4e (diff) |
alpha: fix mkbb compilation warnings
In current 2.6.23-rc1+git, make bootimage gives the following warnings while
compiling mkbb.c. The patch below fixes these warnings by using the proper
include for exit() and using appropriate printf format.
HOSTCC arch/alpha/boot/tools/mkbb
arch/alpha/boot/tools/mkbb.c: In function 'main':
arch/alpha/boot/tools/mkbb.c:95: warning: implicit declaration of function 'exit'
arch/alpha/boot/tools/mkbb.c:95: warning: incompatible implicit declaration of built-in function 'exit'
arch/alpha/boot/tools/mkbb.c:102: warning: incompatible implicit declaration of built-in function 'exit'
arch/alpha/boot/tools/mkbb.c:110: warning: incompatible implicit declaration of built-in function 'exit'
arch/alpha/boot/tools/mkbb.c:117: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
arch/alpha/boot/tools/mkbb.c:118: warning: incompatible implicit declaration of built-in function 'exit'
arch/alpha/boot/tools/mkbb.c:125: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
arch/alpha/boot/tools/mkbb.c:126: warning: incompatible implicit declaration of built-in function 'exit'
arch/alpha/boot/tools/mkbb.c:143: warning: incompatible implicit declaration of built-in function 'exit'
arch/alpha/boot/tools/mkbb.c:148: warning: incompatible implicit declaration of built-in function 'exit'
Signed-off-by: Meelis Roos <mroos@linux.ee>
Cc: Jay Estabrook <jay.estabrook@hp.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/alpha/boot/tools/mkbb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c index 632a7fd6d7dc..1185778e6a1e 100644 --- a/arch/alpha/boot/tools/mkbb.c +++ b/arch/alpha/boot/tools/mkbb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <fcntl.h> | 12 | #include <fcntl.h> |
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | #include <stdlib.h> | ||
14 | #include <stdio.h> | 15 | #include <stdio.h> |
15 | 16 | ||
16 | /* Minimal definition of disklabel, so we don't have to include | 17 | /* Minimal definition of disklabel, so we don't have to include |
@@ -114,7 +115,7 @@ int main(int argc, char ** argv) | |||
114 | nread = read(fd, &bootloader_image, sizeof(bootblock)); | 115 | nread = read(fd, &bootloader_image, sizeof(bootblock)); |
115 | if(nread != sizeof(bootblock)) { | 116 | if(nread != sizeof(bootblock)) { |
116 | perror("lxboot read"); | 117 | perror("lxboot read"); |
117 | fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread); | 118 | fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread); |
118 | exit(0); | 119 | exit(0); |
119 | } | 120 | } |
120 | 121 | ||
@@ -122,7 +123,7 @@ int main(int argc, char ** argv) | |||
122 | nread = read(dev, &bootblock_from_disk, sizeof(bootblock)); | 123 | nread = read(dev, &bootblock_from_disk, sizeof(bootblock)); |
123 | if(nread != sizeof(bootblock)) { | 124 | if(nread != sizeof(bootblock)) { |
124 | perror("bootblock read"); | 125 | perror("bootblock read"); |
125 | fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread); | 126 | fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread); |
126 | exit(0); | 127 | exit(0); |
127 | } | 128 | } |
128 | 129 | ||