diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-02-10 10:27:37 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-02-10 10:27:37 +0000 |
commit | 1792c7acbc8ccaf9f97aa1f3c1b02bcdc8fffd51 (patch) | |
tree | 2ec400b97b794b48fe594b7217dfe44fc5315652 /c/src/lib/libbsp/i386/pc386/tools | |
parent | 2009-02-10 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-1792c7acbc8ccaf9f97aa1f3c1b02bcdc8fffd51.tar.bz2 |
2009-02-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* bin2boot.c: Use stdint/inttypes to workaround build warnings on
64bit hosts.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/tools/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/tools/bin2boot.c | 18 |
2 files changed, 15 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/tools/ChangeLog b/c/src/lib/libbsp/i386/pc386/tools/ChangeLog index 88e44a848e..92d9af6514 100644 --- a/c/src/lib/libbsp/i386/pc386/tools/ChangeLog +++ b/c/src/lib/libbsp/i386/pc386/tools/ChangeLog @@ -1,3 +1,8 @@ +2009-02-10 Ralf Corsépius <ralf.corsepius@rtems.org> + + * bin2boot.c: Use stdint/inttypes to workaround build warnings on + 64bit hosts. + 2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> * bin2boot.c: Fix uninitialized variable warning. diff --git a/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c b/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c index 6c443b5881..eb9263ec6b 100644 --- a/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c +++ b/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c @@ -5,6 +5,8 @@ #include <stdio.h> #include <stdlib.h> +#include <stdint.h> +#include <inttypes.h> #include <unistd.h> #include <string.h> @@ -37,7 +39,7 @@ int main(int argc, char* argv[]) int c, verbose; extern int optind; FILE *ofp, *ifp; - unsigned long headerAddr, addr1, addr2; + uintptr_t headerAddr, addr1, addr2; int size1, size2, len1, len2, len, imageCnt, cnt; char *ofile, *ifile, *end; @@ -183,7 +185,7 @@ int main(int argc, char* argv[]) { /* Areas overlapped */ printf("area overlapping: \n"); - printf("header address 0x%08lx, its memory size 0x%08x\n", + printf("header address 0x%08lx, its memory size 0x%08zx\n", headerAddr, sizeof(buf)); printf("first image address 0x%08lx, its memory size 0x%08x\n", addr1, size1); @@ -292,11 +294,11 @@ int main(int argc, char* argv[]) { /* Areas overlapped */ printf("area overlapping: \n"); - printf("header address 0x%08lx, its memory size 0x%08x\n", + printf("header address 0x%08" PRIxPTR ", its memory size 0x%08zx\n", headerAddr, sizeof(buf)); - printf("first image address 0x%08lx, its memory size 0x%08x\n", + printf("first image address 0x%08" PRIxPTR ", its memory size 0x%08x\n", addr1, size1); - printf("second image address 0x%08lx, its memory size 0x%08x\n", + printf("second image address 0x%08" PRIxPTR ", its memory size 0x%08x\n", addr2, size2); fclose(ofp); @@ -390,11 +392,11 @@ writeHeader: if(verbose) { - printf("header address 0x%08lx, its memory size 0x%08x\n", + printf("header address 0x%08" PRIxPTR ", its memory size 0x%08zx\n", headerAddr, sizeof(buf)); - printf("first image address 0x%08lx, its memory size 0x%08x\n", + printf("first image address 0x%08" PRIxPTR ", its memory size 0x%08x\n", addr1, size1); - printf("second image address 0x%08lx, its memory size 0x%08x\n", + printf("second image address 0x%08" PRIxPTR ", its memory size 0x%08x\n", addr2, size2); } |