2009-02-10 Ralf Corsépius <ralf.corsepius@rtems.org>

* bin2boot.c: Use stdint/inttypes to workaround build warnings on
	  64bit hosts.
This commit is contained in:
Ralf Corsepius
2009-02-10 10:27:37 +00:00
parent 2e3f12c4b5
commit 1792c7acbc
2 changed files with 15 additions and 8 deletions
@@ -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.
+10 -8
View File
@@ -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);
}