mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-26 09:48:27 +08:00
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:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user