diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-04-09 13:18:59 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-04-09 13:18:59 +0000 |
commit | afc39fbfd7e87e8238e379688206a2eb511fbf37 (patch) | |
tree | d61525353492ede12277cc329e7c96e546c38116 | |
parent | 49e6a298283f48e14ad1982fa1da45b10a9ded99 (diff) | |
download | rockbox-afc39fbfd7e87e8238e379688206a2eb511fbf37.tar.gz rockbox-afc39fbfd7e87e8238e379688206a2eb511fbf37.zip |
Code Policing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17046 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | tools/gigabeat.c | 3 | ||||
-rw-r--r-- | tools/gigabeats.c | 2 | ||||
-rw-r--r-- | tools/mi4.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/tools/gigabeat.c b/tools/gigabeat.c index f4d64ea511..5a8d01125d 100644 --- a/tools/gigabeat.c +++ b/tools/gigabeat.c @@ -20,6 +20,9 @@ #include <stdio.h> #include <stdlib.h> +extern void int2le(unsigned int val, unsigned char* addr); +extern unsigned int le2int(unsigned char* buf); + static FILE * openinfile( const char * filename ) { FILE * F = fopen( filename, "rb" ); diff --git a/tools/gigabeats.c b/tools/gigabeats.c index c109d6ad1c..2c5a6286af 100644 --- a/tools/gigabeats.c +++ b/tools/gigabeats.c @@ -93,7 +93,7 @@ int gigabeat_s_code(char *infile, char *outfile) fclose(in); /* Step 2: Create the file header */ - sprintf(buf, "B000FF\n"); + sprintf((char *)buf, "B000FF\n"); put_uint32le(0x88200000, buf+7); /* If the value below is too small, the update will attempt to flash. * Be careful when changing this (leaving it as is won't cause issues) */ diff --git a/tools/mi4.c b/tools/mi4.c index a76308cc8f..42d400864c 100644 --- a/tools/mi4.c +++ b/tools/mi4.c @@ -138,7 +138,7 @@ int mi4_encode(char *iname, char *oname, int version, int magic, memset(outbuf, 0, mi4length); len = fread(outbuf+0x200, 1, length, file); - if(len < length) { + if(len < (size_t)length) { perror(iname); return -2; } @@ -179,7 +179,7 @@ int mi4_encode(char *iname, char *oname, int version, int magic, } len = fwrite(outbuf, 1, mi4length, file); - if(len < length) { + if(len < (size_t)length) { perror(oname); return -4; } |