fix buildrom compiler warnings with gcc4

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2148 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2005-12-29 14:55:09 +00:00
parent 967c4c4a51
commit 2850b5eb20
1 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ void fatal(char *s)
int main(int argc, char *argv[])
{
int infd, payloadfd, outfd, size, insize, readlen, writelen, i;
int infd, payloadfd, outfd, size, readlen, writelen, i;
int romsize;
unsigned char *cp;
struct stat inbuf, payloadbuf;
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
fatal("stat of infile");
if (inbuf.st_size > size) {
fprintf(stderr, "linuxbios image is %d bytes; only %d allowed\n",
inbuf.st_size, size);
(int)inbuf.st_size, size);
fatal("Linuxbios input file larger than allowed size!\n");
}
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
/* read the input file in at the END of the array */
readlen = read(infd, &cp[romsize - inbuf.st_size], inbuf.st_size);
if (readlen < inbuf.st_size) {
fprintf(stderr, "Wanted %d, got %d\n", inbuf.st_size, readlen);
fprintf(stderr, "Wanted %d, got %d\n", (int)inbuf.st_size, readlen);
fatal("Read input file");
}
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
readlen = read(payloadfd, cp, payloadbuf.st_size);
if (readlen < payloadbuf.st_size) {
fprintf(stderr, "Wanted %d, got %d\n",
payloadbuf.st_size, readlen);
(int)payloadbuf.st_size, readlen);
fatal("Read payload file");
}
writelen = write(outfd, cp, romsize);