summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-04-09 13:18:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-04-09 13:18:59 +0000
commitafc39fbfd7e87e8238e379688206a2eb511fbf37 (patch)
treed61525353492ede12277cc329e7c96e546c38116
parent49e6a298283f48e14ad1982fa1da45b10a9ded99 (diff)
downloadrockbox-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.c3
-rw-r--r--tools/gigabeats.c2
-rw-r--r--tools/mi4.c4
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 @@
20#include <stdio.h> 20#include <stdio.h>
21#include <stdlib.h> 21#include <stdlib.h>
22 22
23extern void int2le(unsigned int val, unsigned char* addr);
24extern unsigned int le2int(unsigned char* buf);
25
23static FILE * openinfile( const char * filename ) 26static FILE * openinfile( const char * filename )
24{ 27{
25 FILE * F = fopen( filename, "rb" ); 28 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)
93 fclose(in); 93 fclose(in);
94 94
95 /* Step 2: Create the file header */ 95 /* Step 2: Create the file header */
96 sprintf(buf, "B000FF\n"); 96 sprintf((char *)buf, "B000FF\n");
97 put_uint32le(0x88200000, buf+7); 97 put_uint32le(0x88200000, buf+7);
98 /* If the value below is too small, the update will attempt to flash. 98 /* If the value below is too small, the update will attempt to flash.
99 * Be careful when changing this (leaving it as is won't cause issues) */ 99 * 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,
138 memset(outbuf, 0, mi4length); 138 memset(outbuf, 0, mi4length);
139 139
140 len = fread(outbuf+0x200, 1, length, file); 140 len = fread(outbuf+0x200, 1, length, file);
141 if(len < length) { 141 if(len < (size_t)length) {
142 perror(iname); 142 perror(iname);
143 return -2; 143 return -2;
144 } 144 }
@@ -179,7 +179,7 @@ int mi4_encode(char *iname, char *oname, int version, int magic,
179 } 179 }
180 180
181 len = fwrite(outbuf, 1, mi4length, file); 181 len = fwrite(outbuf, 1, mi4length, file);
182 if(len < length) { 182 if(len < (size_t)length) {
183 perror(oname); 183 perror(oname);
184 return -4; 184 return -4;
185 } 185 }