diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-09-03 23:17:42 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-09-03 23:17:42 +0000 |
commit | e2186479d56762d097b943696423ad8588ca7f92 (patch) | |
tree | 833fb9909a1842e1eb216a695d7bc507855be4e5 /apps/plugins/mikmod/mmio.c | |
parent | 7887e596a99fcaf2198d624bfedf5e2ad97a49cd (diff) | |
download | rockbox-e2186479d56762d097b943696423ad8588ca7f92.tar.gz rockbox-e2186479d56762d097b943696423ad8588ca7f92.zip |
FS#12259: Remove '-w' compiler option for MikMod. Resolve all yet unreported compiler warnings and fix a bug in load_gt2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30424 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mikmod/mmio.c')
-rw-r--r-- | apps/plugins/mikmod/mmio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/plugins/mikmod/mmio.c b/apps/plugins/mikmod/mmio.c index 344833e632..40f38d997d 100644 --- a/apps/plugins/mikmod/mmio.c +++ b/apps/plugins/mikmod/mmio.c | |||
@@ -80,6 +80,7 @@ static long _mm_MemReader_Tell(MREADER* reader); | |||
80 | int _mm_fopen(CHAR* fname,CHAR* attrib) | 80 | int _mm_fopen(CHAR* fname,CHAR* attrib) |
81 | { | 81 | { |
82 | int fp; | 82 | int fp; |
83 | (void)attrib; | ||
83 | 84 | ||
84 | //if(!(fp=fopen(fname,attrib))) { | 85 | //if(!(fp=fopen(fname,attrib))) { |
85 | // _mm_errno = MMERR_OPENING_FILE; | 86 | // _mm_errno = MMERR_OPENING_FILE; |
@@ -212,11 +213,17 @@ static long _mm_FileWriter_Tell(MWRITER* writer) | |||
212 | static int _mm_FileWriter_Write(MWRITER* writer,void* ptr,size_t size) | 213 | static int _mm_FileWriter_Write(MWRITER* writer,void* ptr,size_t size) |
213 | { | 214 | { |
214 | //return (fwrite(ptr,size,1,((MFILEWRITER*)writer)->file)==size); | 215 | //return (fwrite(ptr,size,1,((MFILEWRITER*)writer)->file)==size); |
215 | return (write(ptr,size,((MFILEWRITER*)writer)->file)==size); | 216 | //return (write(ptr,size,((MFILEWRITER*)writer)->file)==(int)size); |
217 | (void)writer; | ||
218 | (void)ptr; | ||
219 | (void)size; | ||
220 | return 0; | ||
216 | } | 221 | } |
217 | 222 | ||
218 | static int _mm_FileWriter_Put(MWRITER* writer,int value) | 223 | static int _mm_FileWriter_Put(MWRITER* writer,int value) |
219 | { | 224 | { |
225 | (void)writer; | ||
226 | (void)value; | ||
220 | //return fputc(value,((MFILEWRITER*)writer)->file); | 227 | //return fputc(value,((MFILEWRITER*)writer)->file); |
221 | return 1; // TODO | 228 | return 1; // TODO |
222 | } | 229 | } |
@@ -292,7 +299,7 @@ static int _mm_MemReader_Read(MREADER* reader,void* ptr,size_t size) | |||
292 | s = ((MMEMREADER*)reader)->buffer; | 299 | s = ((MMEMREADER*)reader)->buffer; |
293 | s += ((MMEMREADER*)reader)->pos; | 300 | s += ((MMEMREADER*)reader)->pos; |
294 | 301 | ||
295 | if ( ((MMEMREADER*)reader)->pos + size > ((MMEMREADER*)reader)->len) | 302 | if ( ((MMEMREADER*)reader)->pos + (long)size > ((MMEMREADER*)reader)->len) |
296 | { | 303 | { |
297 | ((MMEMREADER*)reader)->pos = ((MMEMREADER*)reader)->len; | 304 | ((MMEMREADER*)reader)->pos = ((MMEMREADER*)reader)->len; |
298 | return 0; /* not enough remaining bytes */ | 305 | return 0; /* not enough remaining bytes */ |
@@ -354,7 +361,6 @@ static long _mm_MemReader_Tell(MREADER* reader) | |||
354 | } | 361 | } |
355 | 362 | ||
356 | /*========== Write functions */ | 363 | /*========== Write functions */ |
357 | |||
358 | void _mm_write_string(CHAR* data,MWRITER* writer) | 364 | void _mm_write_string(CHAR* data,MWRITER* writer) |
359 | { | 365 | { |
360 | if(data) | 366 | if(data) |