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 | |
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')
27 files changed, 239 insertions, 58 deletions
diff --git a/apps/plugins/mikmod/load_669.c b/apps/plugins/mikmod/load_669.c index 95b04aa5b1..aad0145cef 100644 --- a/apps/plugins/mikmod/load_669.c +++ b/apps/plugins/mikmod/load_669.c | |||
@@ -250,6 +250,7 @@ int S69_Load(int curious) | |||
250 | int i; | 250 | int i; |
251 | SAMPLE *current; | 251 | SAMPLE *current; |
252 | S69SAMPLE sample; | 252 | S69SAMPLE sample; |
253 | (void)curious; | ||
253 | 254 | ||
254 | /* module header */ | 255 | /* module header */ |
255 | _mm_read_UBYTES(mh->marker,2,modreader); | 256 | _mm_read_UBYTES(mh->marker,2,modreader); |
diff --git a/apps/plugins/mikmod/load_amf.c b/apps/plugins/mikmod/load_amf.c index 12e0af0738..5bb1c672fa 100644 --- a/apps/plugins/mikmod/load_amf.c +++ b/apps/plugins/mikmod/load_amf.c | |||
@@ -332,12 +332,14 @@ static UBYTE* AMF_ConvertTrack(void) | |||
332 | 332 | ||
333 | int AMF_Load(int curious) | 333 | int AMF_Load(int curious) |
334 | { | 334 | { |
335 | int t,u,realtrackcnt,realsmpcnt,defaultpanning; | 335 | int u,defaultpanning; |
336 | unsigned int t,realtrackcnt,realsmpcnt; | ||
336 | AMFSAMPLE s; | 337 | AMFSAMPLE s; |
337 | SAMPLE *q; | 338 | SAMPLE *q; |
338 | UWORD *track_remap; | 339 | UWORD *track_remap; |
339 | ULONG samplepos; | 340 | ULONG samplepos; |
340 | int channel_remap[16]; | 341 | int channel_remap[16]; |
342 | (void)curious; | ||
341 | 343 | ||
342 | /* try to read module header */ | 344 | /* try to read module header */ |
343 | _mm_read_UBYTES(mh->id,3,modreader); | 345 | _mm_read_UBYTES(mh->id,3,modreader); |
@@ -505,7 +507,7 @@ int AMF_Load(int curious) | |||
505 | realtrackcnt=track_remap[t]; | 507 | realtrackcnt=track_remap[t]; |
506 | for(t=0;t<of.numpat*of.numchn;t++) | 508 | for(t=0;t<of.numpat*of.numchn;t++) |
507 | of.patterns[t]=(of.patterns[t]<=mh->numtracks)? | 509 | of.patterns[t]=(of.patterns[t]<=mh->numtracks)? |
508 | track_remap[of.patterns[t]]-1:realtrackcnt; | 510 | track_remap[of.patterns[t]]-1:(int)realtrackcnt; |
509 | 511 | ||
510 | MikMod_free(track_remap); | 512 | MikMod_free(track_remap); |
511 | 513 | ||
diff --git a/apps/plugins/mikmod/load_asy.c b/apps/plugins/mikmod/load_asy.c index 356a686d92..46e899f6bd 100644 --- a/apps/plugins/mikmod/load_asy.c +++ b/apps/plugins/mikmod/load_asy.c | |||
@@ -237,7 +237,8 @@ static UBYTE *ConvertTrack(MODNOTE *n) | |||
237 | /* Loads all patterns of a modfile and converts them into the 3 byte format. */ | 237 | /* Loads all patterns of a modfile and converts them into the 3 byte format. */ |
238 | static int ML_LoadPatterns(void) | 238 | static int ML_LoadPatterns(void) |
239 | { | 239 | { |
240 | int t, s, tracks = 0; | 240 | int t, tracks = 0; |
241 | unsigned int s; | ||
241 | 242 | ||
242 | if (!AllocPatterns()) { | 243 | if (!AllocPatterns()) { |
243 | return 0; | 244 | return 0; |
@@ -277,6 +278,7 @@ static int ASY_Load(int curious) | |||
277 | MSAMPINFO *s; | 278 | MSAMPINFO *s; |
278 | CHAR *descr=asylum; | 279 | CHAR *descr=asylum; |
279 | ULONG seekpos; | 280 | ULONG seekpos; |
281 | (void)curious; | ||
280 | 282 | ||
281 | // no title in asylum amf files :( | 283 | // no title in asylum amf files :( |
282 | strcpy(mh->songname, ""); | 284 | strcpy(mh->songname, ""); |
@@ -286,7 +288,7 @@ static int ASY_Load(int curious) | |||
286 | mh->num_orders = _mm_read_UBYTE(modreader); | 288 | mh->num_orders = _mm_read_UBYTE(modreader); |
287 | 289 | ||
288 | // skip unknown byte | 290 | // skip unknown byte |
289 | _mm_read_UBYTE(modreader); | 291 | (void)_mm_read_UBYTE(modreader); |
290 | _mm_read_UBYTES(mh->positions, 256, modreader); | 292 | _mm_read_UBYTES(mh->positions, 256, modreader); |
291 | 293 | ||
292 | /* read samples headers*/ | 294 | /* read samples headers*/ |
@@ -300,7 +302,7 @@ static int ASY_Load(int curious) | |||
300 | 302 | ||
301 | s->finetune = _mm_read_UBYTE(modreader); | 303 | s->finetune = _mm_read_UBYTE(modreader); |
302 | s->volume = _mm_read_UBYTE(modreader); | 304 | s->volume = _mm_read_UBYTE(modreader); |
303 | _mm_read_UBYTE(modreader); // skip unknown byte | 305 | (void)_mm_read_UBYTE(modreader); // skip unknown byte |
304 | s->length = _mm_read_I_ULONG(modreader); | 306 | s->length = _mm_read_I_ULONG(modreader); |
305 | s->reppos = _mm_read_I_ULONG(modreader); | 307 | s->reppos = _mm_read_I_ULONG(modreader); |
306 | s->replen = _mm_read_I_ULONG(modreader); | 308 | s->replen = _mm_read_I_ULONG(modreader); |
diff --git a/apps/plugins/mikmod/load_dsm.c b/apps/plugins/mikmod/load_dsm.c index 09d6d3e297..9423405cff 100644 --- a/apps/plugins/mikmod/load_dsm.c +++ b/apps/plugins/mikmod/load_dsm.c | |||
@@ -237,6 +237,7 @@ int DSM_Load(int curious) | |||
237 | DSMINST s; | 237 | DSMINST s; |
238 | SAMPLE *q; | 238 | SAMPLE *q; |
239 | int cursmp=0,curpat=0,track=0; | 239 | int cursmp=0,curpat=0,track=0; |
240 | (void)curious; | ||
240 | 241 | ||
241 | blocklp=0; | 242 | blocklp=0; |
242 | blockln=12; | 243 | blockln=12; |
diff --git a/apps/plugins/mikmod/load_far.c b/apps/plugins/mikmod/load_far.c index 69d48d6b96..bbb3c39d91 100644 --- a/apps/plugins/mikmod/load_far.c +++ b/apps/plugins/mikmod/load_far.c | |||
@@ -180,6 +180,7 @@ int FAR_Load(int curious) | |||
180 | FARSAMPLE s; | 180 | FARSAMPLE s; |
181 | FARNOTE *crow; | 181 | FARNOTE *crow; |
182 | UBYTE smap[8]; | 182 | UBYTE smap[8]; |
183 | (void)curious; | ||
183 | 184 | ||
184 | /* try to read module header (first part) */ | 185 | /* try to read module header (first part) */ |
185 | _mm_read_UBYTES(mh1->id,4,modreader); | 186 | _mm_read_UBYTES(mh1->id,4,modreader); |
diff --git a/apps/plugins/mikmod/load_gdm.c b/apps/plugins/mikmod/load_gdm.c index 616a2b56a3..18a1d8eb1e 100644 --- a/apps/plugins/mikmod/load_gdm.c +++ b/apps/plugins/mikmod/load_gdm.c | |||
@@ -343,6 +343,7 @@ int GDM_Load(int curious) | |||
343 | SAMPLE *q; | 343 | SAMPLE *q; |
344 | GDMSAMPLE s; | 344 | GDMSAMPLE s; |
345 | ULONG position; | 345 | ULONG position; |
346 | (void)curious; | ||
346 | 347 | ||
347 | /* read header */ | 348 | /* read header */ |
348 | _mm_read_string(mh->id1,4,modreader); | 349 | _mm_read_string(mh->id1,4,modreader); |
diff --git a/apps/plugins/mikmod/load_gt2.c b/apps/plugins/mikmod/load_gt2.c index 996de0e61e..9baef5c09b 100644 --- a/apps/plugins/mikmod/load_gt2.c +++ b/apps/plugins/mikmod/load_gt2.c | |||
@@ -217,7 +217,7 @@ GT_CHUNK *loadChunk(void) | |||
217 | _mm_read_M_ULONGS(&new_chunk->gt2.chunk_size, 1, modreader); | 217 | _mm_read_M_ULONGS(&new_chunk->gt2.chunk_size, 1, modreader); |
218 | new_chunk->gt2.module_name[32] = 0; | 218 | new_chunk->gt2.module_name[32] = 0; |
219 | _mm_read_UBYTES(&new_chunk->gt2.module_name, 32, modreader); | 219 | _mm_read_UBYTES(&new_chunk->gt2.module_name, 32, modreader); |
220 | new_chunk->gt2.module_name[160] = 0; | 220 | new_chunk->gt2.comments_author[160] = 0; |
221 | _mm_read_UBYTES(&new_chunk->gt2.comments_author, 160, modreader); | 221 | _mm_read_UBYTES(&new_chunk->gt2.comments_author, 160, modreader); |
222 | _mm_read_UBYTES(&new_chunk->gt2.date_day, 1, modreader); | 222 | _mm_read_UBYTES(&new_chunk->gt2.date_day, 1, modreader); |
223 | _mm_read_UBYTES(&new_chunk->gt2.date_month, 1, modreader); | 223 | _mm_read_UBYTES(&new_chunk->gt2.date_month, 1, modreader); |
@@ -332,6 +332,7 @@ int GT2_Test(void) | |||
332 | int GT2_Load(int curious) | 332 | int GT2_Load(int curious) |
333 | { | 333 | { |
334 | GT_CHUNK *tmp; | 334 | GT_CHUNK *tmp; |
335 | (void)curious; | ||
335 | 336 | ||
336 | _mm_fseek(modreader, 0, SEEK_SET); | 337 | _mm_fseek(modreader, 0, SEEK_SET); |
337 | while ( (tmp = loadChunk() )) | 338 | while ( (tmp = loadChunk() )) |
diff --git a/apps/plugins/mikmod/load_imf.c b/apps/plugins/mikmod/load_imf.c index 0b85c0ecc3..568af2935e 100644 --- a/apps/plugins/mikmod/load_imf.c +++ b/apps/plugins/mikmod/load_imf.c | |||
@@ -388,6 +388,7 @@ int IMF_Load(int curious) | |||
388 | ULONG *nextwav=NULL; | 388 | ULONG *nextwav=NULL; |
389 | UWORD wavcnt=0; | 389 | UWORD wavcnt=0; |
390 | UBYTE id[4]; | 390 | UBYTE id[4]; |
391 | (void)curious; | ||
391 | 392 | ||
392 | /* try to read the module header */ | 393 | /* try to read the module header */ |
393 | _mm_read_string(mh->songname,32,modreader); | 394 | _mm_read_string(mh->songname,32,modreader); |
@@ -515,9 +516,9 @@ int IMF_Load(int curious) | |||
515 | ih. name##beg=_mm_read_UBYTE(modreader); \ | 516 | ih. name##beg=_mm_read_UBYTE(modreader); \ |
516 | ih. name##end=_mm_read_UBYTE(modreader); \ | 517 | ih. name##end=_mm_read_UBYTE(modreader); \ |
517 | ih. name##flg=_mm_read_UBYTE(modreader); \ | 518 | ih. name##flg=_mm_read_UBYTE(modreader); \ |
518 | _mm_read_UBYTE(modreader); \ | 519 | (void)_mm_read_UBYTE(modreader); \ |
519 | _mm_read_UBYTE(modreader); \ | 520 | (void)_mm_read_UBYTE(modreader); \ |
520 | _mm_read_UBYTE(modreader) | 521 | (void)_mm_read_UBYTE(modreader) |
521 | #else | 522 | #else |
522 | #define IMF_FinishLoadingEnvelope(name) \ | 523 | #define IMF_FinishLoadingEnvelope(name) \ |
523 | ih. name/**/pts=_mm_read_UBYTE(modreader); \ | 524 | ih. name/**/pts=_mm_read_UBYTE(modreader); \ |
@@ -525,9 +526,9 @@ int IMF_Load(int curious) | |||
525 | ih. name/**/beg=_mm_read_UBYTE(modreader); \ | 526 | ih. name/**/beg=_mm_read_UBYTE(modreader); \ |
526 | ih. name/**/end=_mm_read_UBYTE(modreader); \ | 527 | ih. name/**/end=_mm_read_UBYTE(modreader); \ |
527 | ih. name/**/flg=_mm_read_UBYTE(modreader); \ | 528 | ih. name/**/flg=_mm_read_UBYTE(modreader); \ |
528 | _mm_read_UBYTE(modreader); \ | 529 | (void)_mm_read_UBYTE(modreader); \ |
529 | _mm_read_UBYTE(modreader); \ | 530 | (void)_mm_read_UBYTE(modreader); \ |
530 | _mm_read_UBYTE(modreader) | 531 | (void)_mm_read_UBYTE(modreader) |
531 | #endif | 532 | #endif |
532 | 533 | ||
533 | IMF_FinishLoadingEnvelope(vol); | 534 | IMF_FinishLoadingEnvelope(vol); |
@@ -626,7 +627,7 @@ int IMF_Load(int curious) | |||
626 | } | 627 | } |
627 | 628 | ||
628 | _mm_read_string(s->samplename,13,modreader); | 629 | _mm_read_string(s->samplename,13,modreader); |
629 | _mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader); | 630 | (void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader); |
630 | s->length =_mm_read_I_ULONG(modreader); | 631 | s->length =_mm_read_I_ULONG(modreader); |
631 | s->loopstart =_mm_read_I_ULONG(modreader); | 632 | s->loopstart =_mm_read_I_ULONG(modreader); |
632 | s->loopend =_mm_read_I_ULONG(modreader); | 633 | s->loopend =_mm_read_I_ULONG(modreader); |
diff --git a/apps/plugins/mikmod/load_it.c b/apps/plugins/mikmod/load_it.c index 6ce3a1ce65..842fafe471 100644 --- a/apps/plugins/mikmod/load_it.c +++ b/apps/plugins/mikmod/load_it.c | |||
@@ -238,10 +238,10 @@ static int IT_GetNumChannels(UWORD patrows) | |||
238 | ch=(flag-1)&63; | 238 | ch=(flag-1)&63; |
239 | remap[ch]=0; | 239 | remap[ch]=0; |
240 | if(flag & 128) mask[ch]=_mm_read_UBYTE(modreader); | 240 | if(flag & 128) mask[ch]=_mm_read_UBYTE(modreader); |
241 | if(mask[ch]&1) _mm_read_UBYTE(modreader); | 241 | if(mask[ch]&1) (void)_mm_read_UBYTE(modreader); |
242 | if(mask[ch]&2) _mm_read_UBYTE(modreader); | 242 | if(mask[ch]&2) (void)_mm_read_UBYTE(modreader); |
243 | if(mask[ch]&4) _mm_read_UBYTE(modreader); | 243 | if(mask[ch]&4) (void)_mm_read_UBYTE(modreader); |
244 | if(mask[ch]&8) { _mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader); } | 244 | if(mask[ch]&8) { (void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader); } |
245 | } | 245 | } |
246 | } while(row<patrows); | 246 | } while(row<patrows); |
247 | 247 | ||
@@ -726,7 +726,7 @@ int IT_Load(int curious) | |||
726 | 726 | ||
727 | ih.trkvers = _mm_read_I_UWORD(modreader); | 727 | ih.trkvers = _mm_read_I_UWORD(modreader); |
728 | ih.numsmp = _mm_read_UBYTE(modreader); | 728 | ih.numsmp = _mm_read_UBYTE(modreader); |
729 | _mm_read_UBYTE(modreader); | 729 | (void)_mm_read_UBYTE(modreader); |
730 | _mm_read_string(ih.name,26,modreader); | 730 | _mm_read_string(ih.name,26,modreader); |
731 | _mm_read_UBYTES(ih.blank01,6,modreader); | 731 | _mm_read_UBYTES(ih.blank01,6,modreader); |
732 | _mm_read_I_UWORDS(ih.samptable,ITNOTECNT,modreader); | 732 | _mm_read_I_UWORDS(ih.samptable,ITNOTECNT,modreader); |
@@ -751,7 +751,7 @@ int IT_Load(int curious) | |||
751 | ih. name##node[lp]=_mm_read_##type (modreader); \ | 751 | ih. name##node[lp]=_mm_read_##type (modreader); \ |
752 | ih. name##tick[lp]=_mm_read_I_UWORD(modreader); \ | 752 | ih. name##tick[lp]=_mm_read_I_UWORD(modreader); \ |
753 | } \ | 753 | } \ |
754 | _mm_read_UBYTE(modreader) | 754 | (void)_mm_read_UBYTE(modreader) |
755 | #else | 755 | #else |
756 | #define IT_LoadEnvelope(name,type) \ | 756 | #define IT_LoadEnvelope(name,type) \ |
757 | ih. name/**/flg =_mm_read_UBYTE(modreader); \ | 757 | ih. name/**/flg =_mm_read_UBYTE(modreader); \ |
@@ -764,7 +764,7 @@ int IT_Load(int curious) | |||
764 | ih. name/**/node[lp]=_mm_read_/**/type (modreader); \ | 764 | ih. name/**/node[lp]=_mm_read_/**/type (modreader); \ |
765 | ih. name/**/tick[lp]=_mm_read_I_UWORD(modreader); \ | 765 | ih. name/**/tick[lp]=_mm_read_I_UWORD(modreader); \ |
766 | } \ | 766 | } \ |
767 | _mm_read_UBYTE(modreader) | 767 | (void)_mm_read_UBYTE(modreader) |
768 | #endif | 768 | #endif |
769 | 769 | ||
770 | IT_LoadEnvelope(vol,UBYTE); | 770 | IT_LoadEnvelope(vol,UBYTE); |
diff --git a/apps/plugins/mikmod/load_m15.c b/apps/plugins/mikmod/load_m15.c index d97378aab3..b5d5329bf0 100644 --- a/apps/plugins/mikmod/load_m15.c +++ b/apps/plugins/mikmod/load_m15.c | |||
@@ -147,12 +147,12 @@ static int LoadModuleHeader(MODULEHEADER *mh) | |||
147 | Returns: 0 indecisive; 1 = UST; 2 = 15-inst */ | 147 | Returns: 0 indecisive; 1 = UST; 2 = 15-inst */ |
148 | static int CheckPatternType(int numpat) | 148 | static int CheckPatternType(int numpat) |
149 | { | 149 | { |
150 | int t; | 150 | unsigned int t; |
151 | UBYTE eff, dat; | 151 | UBYTE eff, dat; |
152 | 152 | ||
153 | for(t=0;t<numpat*(64U*4);t++) { | 153 | for(t=0;t<numpat*(64U*4);t++) { |
154 | /* Load the pattern into the temp buffer and scan it */ | 154 | /* Load the pattern into the temp buffer and scan it */ |
155 | _mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader); | 155 | (void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader); |
156 | eff = _mm_read_UBYTE(modreader); | 156 | eff = _mm_read_UBYTE(modreader); |
157 | dat = _mm_read_UBYTE(modreader); | 157 | dat = _mm_read_UBYTE(modreader); |
158 | 158 | ||
@@ -372,7 +372,8 @@ static UBYTE *M15_ConvertTrack(MODNOTE* n) | |||
372 | /* Loads all patterns of a modfile and converts them into the 3 byte format. */ | 372 | /* Loads all patterns of a modfile and converts them into the 3 byte format. */ |
373 | static int M15_LoadPatterns(void) | 373 | static int M15_LoadPatterns(void) |
374 | { | 374 | { |
375 | int t,s,tracks=0; | 375 | int t,tracks=0; |
376 | unsigned int s; | ||
376 | 377 | ||
377 | if(!AllocPatterns()) return 0; | 378 | if(!AllocPatterns()) return 0; |
378 | if(!AllocTracks()) return 0; | 379 | if(!AllocTracks()) return 0; |
diff --git a/apps/plugins/mikmod/load_mod.c b/apps/plugins/mikmod/load_mod.c index 92b9787c50..6075e9c7e1 100644 --- a/apps/plugins/mikmod/load_mod.c +++ b/apps/plugins/mikmod/load_mod.c | |||
@@ -309,7 +309,8 @@ static UBYTE *ConvertTrack(MODNOTE *n, int numchn) | |||
309 | /* Loads all patterns of a modfile and converts them into the 3 byte format. */ | 309 | /* Loads all patterns of a modfile and converts them into the 3 byte format. */ |
310 | static int ML_LoadPatterns(void) | 310 | static int ML_LoadPatterns(void) |
311 | { | 311 | { |
312 | int t, s, tracks = 0; | 312 | int t, tracks = 0; |
313 | unsigned int s; | ||
313 | 314 | ||
314 | if (!AllocPatterns()) | 315 | if (!AllocPatterns()) |
315 | return 0; | 316 | return 0; |
diff --git a/apps/plugins/mikmod/load_mtm.c b/apps/plugins/mikmod/load_mtm.c index abd1da41f5..bd6223d948 100644 --- a/apps/plugins/mikmod/load_mtm.c +++ b/apps/plugins/mikmod/load_mtm.c | |||
@@ -145,6 +145,7 @@ int MTM_Load(int curious) | |||
145 | int t,u; | 145 | int t,u; |
146 | MTMSAMPLE s; | 146 | MTMSAMPLE s; |
147 | SAMPLE *q; | 147 | SAMPLE *q; |
148 | (void)curious; | ||
148 | 149 | ||
149 | /* try to read module header */ | 150 | /* try to read module header */ |
150 | _mm_read_UBYTES(mh->id,3,modreader); | 151 | _mm_read_UBYTES(mh->id,3,modreader); |
@@ -219,7 +220,7 @@ int MTM_Load(int curious) | |||
219 | if(!AllocPositions(of.numpos)) return 0; | 220 | if(!AllocPositions(of.numpos)) return 0; |
220 | for(t=0;t<of.numpos;t++) | 221 | for(t=0;t<of.numpos;t++) |
221 | of.positions[t]=_mm_read_UBYTE(modreader); | 222 | of.positions[t]=_mm_read_UBYTE(modreader); |
222 | for(;t<128;t++) _mm_read_UBYTE(modreader); | 223 | for(;t<128;t++) (void)_mm_read_UBYTE(modreader); |
223 | if(_mm_eof(modreader)) { | 224 | if(_mm_eof(modreader)) { |
224 | _mm_errno = MMERR_LOADING_HEADER; | 225 | _mm_errno = MMERR_LOADING_HEADER; |
225 | return 0; | 226 | return 0; |
diff --git a/apps/plugins/mikmod/load_okt.c b/apps/plugins/mikmod/load_okt.c index c4420e5738..08d743242c 100644 --- a/apps/plugins/mikmod/load_okt.c +++ b/apps/plugins/mikmod/load_okt.c | |||
@@ -203,7 +203,7 @@ static int OKT_doSAMP(int len) | |||
203 | s.len = _mm_read_M_ULONG(modreader); | 203 | s.len = _mm_read_M_ULONG(modreader); |
204 | s.loopbeg = _mm_read_M_UWORD(modreader) * 2; | 204 | s.loopbeg = _mm_read_M_UWORD(modreader) * 2; |
205 | s.looplen = _mm_read_M_UWORD(modreader) * 2; | 205 | s.looplen = _mm_read_M_UWORD(modreader) * 2; |
206 | _mm_read_UBYTE(modreader); | 206 | (void)_mm_read_UBYTE(modreader); |
207 | s.volume = _mm_read_UBYTE(modreader); | 207 | s.volume = _mm_read_UBYTE(modreader); |
208 | _mm_read_M_UWORD(modreader); | 208 | _mm_read_M_UWORD(modreader); |
209 | 209 | ||
@@ -330,6 +330,7 @@ int OKT_Load(int curious) | |||
330 | int seen_cmod = 0, seen_samp = 0, seen_slen = 0, seen_plen = 0, seen_patt | 330 | int seen_cmod = 0, seen_samp = 0, seen_slen = 0, seen_plen = 0, seen_patt |
331 | = 0, seen_spee = 0; | 331 | = 0, seen_spee = 0; |
332 | int patnum = 0, insnum = 0; | 332 | int patnum = 0, insnum = 0; |
333 | (void)curious; | ||
333 | 334 | ||
334 | /* skip OKTALYZER header */ | 335 | /* skip OKTALYZER header */ |
335 | _mm_fseek(modreader, 8, SEEK_SET); | 336 | _mm_fseek(modreader, 8, SEEK_SET); |
diff --git a/apps/plugins/mikmod/load_s3m.c b/apps/plugins/mikmod/load_s3m.c index 4ecb5bdd1f..71183d2225 100644 --- a/apps/plugins/mikmod/load_s3m.c +++ b/apps/plugins/mikmod/load_s3m.c | |||
@@ -172,9 +172,9 @@ static int S3M_GetNumChannels(void) | |||
172 | if(flag) { | 172 | if(flag) { |
173 | ch=flag&31; | 173 | ch=flag&31; |
174 | if(mh->channels[ch]<32) remap[ch] = 0; | 174 | if(mh->channels[ch]<32) remap[ch] = 0; |
175 | if(flag&32) {_mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);} | 175 | if(flag&32) {(void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);} |
176 | if(flag&64) _mm_read_UBYTE(modreader); | 176 | if(flag&64) (void)_mm_read_UBYTE(modreader); |
177 | if(flag&128){_mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);} | 177 | if(flag&128){(void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);} |
178 | } else row++; | 178 | } else row++; |
179 | } | 179 | } |
180 | return 0; | 180 | return 0; |
diff --git a/apps/plugins/mikmod/load_stm.c b/apps/plugins/mikmod/load_stm.c index 57df85c92d..c1d771df11 100644 --- a/apps/plugins/mikmod/load_stm.c +++ b/apps/plugins/mikmod/load_stm.c | |||
@@ -224,7 +224,8 @@ static UBYTE *STM_ConvertTrack(STMNOTE *n) | |||
224 | 224 | ||
225 | static int STM_LoadPatterns(void) | 225 | static int STM_LoadPatterns(void) |
226 | { | 226 | { |
227 | int t,s,tracks=0; | 227 | int t,tracks=0; |
228 | unsigned int s; | ||
228 | 229 | ||
229 | if(!AllocPatterns()) return 0; | 230 | if(!AllocPatterns()) return 0; |
230 | if(!AllocTracks()) return 0; | 231 | if(!AllocTracks()) return 0; |
@@ -254,6 +255,7 @@ int STM_Load(int curious) | |||
254 | int t; | 255 | int t; |
255 | ULONG MikMod_ISA; /* We must generate our own ISA, it's not stored in stm */ | 256 | ULONG MikMod_ISA; /* We must generate our own ISA, it's not stored in stm */ |
256 | SAMPLE *q; | 257 | SAMPLE *q; |
258 | (void)curious; | ||
257 | 259 | ||
258 | /* try to read stm header */ | 260 | /* try to read stm header */ |
259 | _mm_read_string(mh->songname,20,modreader); | 261 | _mm_read_string(mh->songname,20,modreader); |
diff --git a/apps/plugins/mikmod/load_ult.c b/apps/plugins/mikmod/load_ult.c index aca2407a4a..2d8d3a9788 100644 --- a/apps/plugins/mikmod/load_ult.c +++ b/apps/plugins/mikmod/load_ult.c | |||
@@ -131,6 +131,7 @@ int ULT_Load(int curious) | |||
131 | ULTSAMPLE s; | 131 | ULTSAMPLE s; |
132 | ULTHEADER mh; | 132 | ULTHEADER mh; |
133 | UBYTE nos,noc,rbnop; | 133 | UBYTE nos,noc,rbnop; |
134 | (void)curious; | ||
134 | 135 | ||
135 | /* try to read module header */ | 136 | /* try to read module header */ |
136 | _mm_read_string(mh.id,15,modreader); | 137 | _mm_read_string(mh.id,15,modreader); |
diff --git a/apps/plugins/mikmod/load_uni.c b/apps/plugins/mikmod/load_uni.c index 3140336b94..7a5a24a507 100644 --- a/apps/plugins/mikmod/load_uni.c +++ b/apps/plugins/mikmod/load_uni.c | |||
@@ -504,6 +504,7 @@ int UNI_Load(int curious) | |||
504 | char *modtype,*oldtype=NULL; | 504 | char *modtype,*oldtype=NULL; |
505 | INSTRUMENT *d; | 505 | INSTRUMENT *d; |
506 | SAMPLE *q; | 506 | SAMPLE *q; |
507 | (void)curious; | ||
507 | 508 | ||
508 | /* read module header */ | 509 | /* read module header */ |
509 | _mm_read_UBYTES(mh.id,4,modreader); | 510 | _mm_read_UBYTES(mh.id,4,modreader); |
@@ -514,7 +515,7 @@ int UNI_Load(int curious) | |||
514 | 515 | ||
515 | if(universion>=6) { | 516 | if(universion>=6) { |
516 | if (universion==6) | 517 | if (universion==6) |
517 | _mm_read_UBYTE(modreader); | 518 | (void)_mm_read_UBYTE(modreader); |
518 | else | 519 | else |
519 | universion=_mm_read_M_UWORD(modreader); | 520 | universion=_mm_read_M_UWORD(modreader); |
520 | 521 | ||
diff --git a/apps/plugins/mikmod/load_xm.c b/apps/plugins/mikmod/load_xm.c index 54a95aa2e6..8eaafc3d93 100644 --- a/apps/plugins/mikmod/load_xm.c +++ b/apps/plugins/mikmod/load_xm.c | |||
@@ -500,7 +500,7 @@ static int LoadInstruments(void) | |||
500 | 500 | ||
501 | /* read the remainder of the header | 501 | /* read the remainder of the header |
502 | (2 bytes for 1.03, 22 for 1.04) */ | 502 | (2 bytes for 1.03, 22 for 1.04) */ |
503 | if (headend>=_mm_ftell(modreader)) for(u=headend-_mm_ftell(modreader);u;u--) _mm_read_UBYTE(modreader); | 503 | if (headend>=_mm_ftell(modreader)) for(u=headend-_mm_ftell(modreader);u;u--) (void)_mm_read_UBYTE(modreader); |
504 | 504 | ||
505 | /* we can't trust the envelope point count here, as some | 505 | /* we can't trust the envelope point count here, as some |
506 | modules have incorrect values (K_OSPACE.XM reports 32 volume | 506 | modules have incorrect values (K_OSPACE.XM reports 32 volume |
@@ -634,7 +634,7 @@ static int LoadInstruments(void) | |||
634 | break; | 634 | break; |
635 | } | 635 | } |
636 | _mm_fseek(modreader,ck,SEEK_SET); | 636 | _mm_fseek(modreader,ck,SEEK_SET); |
637 | for(u=headend-_mm_ftell(modreader);u;u--) _mm_read_UBYTE(modreader); | 637 | for(u=headend-_mm_ftell(modreader);u;u--) (void)_mm_read_UBYTE(modreader); |
638 | 638 | ||
639 | if(_mm_eof(modreader)) { | 639 | if(_mm_eof(modreader)) { |
640 | MikMod_free(nextwav);MikMod_free(wh); | 640 | MikMod_free(nextwav);MikMod_free(wh); |
@@ -664,6 +664,7 @@ int XM_Load(int curious) | |||
664 | int t,u; | 664 | int t,u; |
665 | int dummypat=0; | 665 | int dummypat=0; |
666 | char tracker[21],modtype[60]; | 666 | char tracker[21],modtype[60]; |
667 | (void)curious; | ||
667 | 668 | ||
668 | /* try to read module header */ | 669 | /* try to read module header */ |
669 | _mm_read_string(mh->id,17,modreader); | 670 | _mm_read_string(mh->id,17,modreader); |
diff --git a/apps/plugins/mikmod/mikmod.c b/apps/plugins/mikmod/mikmod.c index d132f80498..63d575a958 100644 --- a/apps/plugins/mikmod/mikmod.c +++ b/apps/plugins/mikmod/mikmod.c | |||
@@ -50,9 +50,6 @@ static unsigned char* audio_buffer; | |||
50 | static size_t audio_buffer_free; | 50 | static size_t audio_buffer_free; |
51 | 51 | ||
52 | 52 | ||
53 | /* The rockbox plugin interface */ | ||
54 | MEM_FUNCTION_WRAPPERS; | ||
55 | |||
56 | bool quit; | 53 | bool quit; |
57 | int playingtime IBSS_ATTR; | 54 | int playingtime IBSS_ATTR; |
58 | MODULE *module IBSS_ATTR; | 55 | MODULE *module IBSS_ATTR; |
@@ -147,10 +144,12 @@ void mmsupp_printf(const char *fmt, ...) | |||
147 | /************************* File Access ***************************/ | 144 | /************************* File Access ***************************/ |
148 | 145 | ||
149 | /* support function for qsort() */ | 146 | /* support function for qsort() */ |
147 | /* not used | ||
150 | static int compare(const void* p1, const void* p2) | 148 | static int compare(const void* p1, const void* p2) |
151 | { | 149 | { |
152 | return rb->strcasecmp(*((char **)p1), *((char **)p2)); | 150 | return rb->strcasecmp(*((char **)p1), *((char **)p2)); |
153 | } | 151 | } |
152 | */ | ||
154 | 153 | ||
155 | bool mod_ext(const char ext[]) | 154 | bool mod_ext(const char ext[]) |
156 | { | 155 | { |
@@ -290,7 +289,7 @@ void get_more(unsigned char** start, size_t* size) | |||
290 | #endif | 289 | #endif |
291 | } | 290 | } |
292 | 291 | ||
293 | void showinfo() | 292 | void showinfo(void) |
294 | { | 293 | { |
295 | char statustext[LINE_LENGTH]; | 294 | char statustext[LINE_LENGTH]; |
296 | 295 | ||
@@ -348,9 +347,9 @@ void showinfo() | |||
348 | rb->lcd_update(); | 347 | rb->lcd_update(); |
349 | } | 348 | } |
350 | 349 | ||
351 | void showsamples() | 350 | void showsamples(void) |
352 | { | 351 | { |
353 | int i, j; | 352 | int i; |
354 | char statustext[LINE_LENGTH]; | 353 | char statustext[LINE_LENGTH]; |
355 | 354 | ||
356 | if ( screenupdated ) | 355 | if ( screenupdated ) |
@@ -367,9 +366,9 @@ void showsamples() | |||
367 | screenupdated = true; | 366 | screenupdated = true; |
368 | } | 367 | } |
369 | 368 | ||
370 | void showinstruments() | 369 | void showinstruments(void) |
371 | { | 370 | { |
372 | int i, j; | 371 | int i; |
373 | char statustext[LINE_LENGTH]; | 372 | char statustext[LINE_LENGTH]; |
374 | 373 | ||
375 | if ( screenupdated ) | 374 | if ( screenupdated ) |
@@ -386,7 +385,7 @@ void showinstruments() | |||
386 | screenupdated = true; | 385 | screenupdated = true; |
387 | } | 386 | } |
388 | 387 | ||
389 | void showcomments() | 388 | void showcomments(void) |
390 | { | 389 | { |
391 | int i, j=0, k=0, l; | 390 | int i, j=0, k=0, l; |
392 | char statustext[LINE_LENGTH]; | 391 | char statustext[LINE_LENGTH]; |
@@ -425,7 +424,7 @@ void showcomments() | |||
425 | screenupdated = true; | 424 | screenupdated = true; |
426 | } | 425 | } |
427 | 426 | ||
428 | int changedisplay() | 427 | void changedisplay(void) |
429 | { | 428 | { |
430 | display = (display+1) % 4; | 429 | display = (display+1) % 4; |
431 | 430 | ||
@@ -494,7 +493,7 @@ static struct configdata config[] = | |||
494 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, "CPU Boost", NULL}, | 493 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, "CPU Boost", NULL}, |
495 | }; | 494 | }; |
496 | 495 | ||
497 | void applysettings() | 496 | void applysettings(void) |
498 | { | 497 | { |
499 | md_pansep = settings.pansep; | 498 | md_pansep = settings.pansep; |
500 | md_reverb = settings.reverb; | 499 | md_reverb = settings.reverb; |
@@ -525,7 +524,6 @@ void applysettings() | |||
525 | int settings_menu(void) | 524 | int settings_menu(void) |
526 | { | 525 | { |
527 | int selection = 0; | 526 | int selection = 0; |
528 | bool old_val; | ||
529 | 527 | ||
530 | MENUITEM_STRINGLIST(settings_menu, "Mikmod Settings", NULL, "Panning Separation", | 528 | MENUITEM_STRINGLIST(settings_menu, "Mikmod Settings", NULL, "Panning Separation", |
531 | "Reverberation", "Interpolation", "Reverse Channels", "Surround", | 529 | "Reverberation", "Interpolation", "Reverse Channels", "Surround", |
diff --git a/apps/plugins/mikmod/mikmod.make b/apps/plugins/mikmod/mikmod.make index 112c25dda1..94eea8c4e6 100644 --- a/apps/plugins/mikmod/mikmod.make +++ b/apps/plugins/mikmod/mikmod.make | |||
@@ -18,7 +18,7 @@ MIKMOD_OBJ := $(call c2obj, $(MIKMOD_SRC)) | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | 18 | # add source files to OTHER_SRC to get automatic dependencies |
19 | OTHER_SRC += $(MIKMOD_SRC) | 19 | OTHER_SRC += $(MIKMOD_SRC) |
20 | 20 | ||
21 | MIKMODCFLAGS = $(PLUGINFLAGS) -I$(MIKMODSRCDIR) -w | 21 | MIKMODCFLAGS = $(PLUGINFLAGS) -I$(MIKMODSRCDIR) |
22 | ifeq ($(CPU),coldfire) | 22 | ifeq ($(CPU),coldfire) |
23 | MIKMODCFLAGS += -O0 | 23 | MIKMODCFLAGS += -O0 |
24 | else | 24 | else |
diff --git a/apps/plugins/mikmod/mikmod_internals.h b/apps/plugins/mikmod/mikmod_internals.h index 284dd85936..acd514ad39 100644 --- a/apps/plugins/mikmod/mikmod_internals.h +++ b/apps/plugins/mikmod/mikmod_internals.h | |||
@@ -140,7 +140,9 @@ extern void _mm_iobase_setcur(MREADER*); | |||
140 | extern void _mm_iobase_revert(MREADER*); | 140 | extern void _mm_iobase_revert(MREADER*); |
141 | extern int _mm_fopen(CHAR*,CHAR*); | 141 | extern int _mm_fopen(CHAR*,CHAR*); |
142 | extern int _mm_fclose(int); | 142 | extern int _mm_fclose(int); |
143 | #if !defined(ROCKBOX) | ||
143 | extern void _mm_write_string(CHAR*,MWRITER*); | 144 | extern void _mm_write_string(CHAR*,MWRITER*); |
145 | #endif | ||
144 | extern int _mm_read_string (CHAR*,int,MREADER*); | 146 | extern int _mm_read_string (CHAR*,int,MREADER*); |
145 | 147 | ||
146 | extern SWORD _mm_read_M_SWORD(MREADER*); | 148 | extern SWORD _mm_read_M_SWORD(MREADER*); |
diff --git a/apps/plugins/mikmod/mlutil.c b/apps/plugins/mikmod/mlutil.c index 6d3a05f45d..114deb6b24 100644 --- a/apps/plugins/mikmod/mlutil.c +++ b/apps/plugins/mikmod/mlutil.c | |||
@@ -93,7 +93,7 @@ void FreeLinear(void) | |||
93 | 93 | ||
94 | int speed_to_finetune(ULONG speed,int sample) | 94 | int speed_to_finetune(ULONG speed,int sample) |
95 | { | 95 | { |
96 | int ctmp=0,tmp,note=1,finetune=0; | 96 | ULONG ctmp=0,tmp,note=1,finetune=0; |
97 | 97 | ||
98 | speed>>=1; | 98 | speed>>=1; |
99 | while((tmp=getfrequency(of.flags,getlinearperiod(note<<1,0)))<speed) { | 99 | while((tmp=getfrequency(of.flags,getlinearperiod(note<<1,0)))<speed) { |
diff --git a/apps/plugins/mikmod/mmalloc.c b/apps/plugins/mikmod/mmalloc.c index 7d505dff93..2797def57d 100644 --- a/apps/plugins/mikmod/mmalloc.c +++ b/apps/plugins/mikmod/mmalloc.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "mikmod_internals.h" | 33 | #include "mikmod_internals.h" |
34 | 34 | ||
35 | #define ALIGN_STRIDE 16 | 35 | #define ALIGN_STRIDE 16 |
36 | 36 | /* not used | |
37 | static void * align_pointer(char *ptr, size_t stride) | 37 | static void * align_pointer(char *ptr, size_t stride) |
38 | { | 38 | { |
39 | char *pptr = ptr + sizeof(void*); | 39 | char *pptr = ptr + sizeof(void*); |
@@ -53,7 +53,7 @@ static void *get_pointer(void *data) | |||
53 | size_t _ptr = *(size_t*)_pptr; | 53 | size_t _ptr = *(size_t*)_pptr; |
54 | return (void*)_ptr; | 54 | return (void*)_ptr; |
55 | } | 55 | } |
56 | 56 | */ | |
57 | 57 | ||
58 | void* MikMod_realloc(void *data, size_t size) | 58 | void* MikMod_realloc(void *data, size_t size) |
59 | { | 59 | { |
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) |
diff --git a/apps/plugins/mikmod/mplayer.c b/apps/plugins/mikmod/mplayer.c index 92585f0320..396cf6c115 100644 --- a/apps/plugins/mikmod/mplayer.c +++ b/apps/plugins/mikmod/mplayer.c | |||
@@ -546,6 +546,8 @@ static void DoArpeggio(UWORD tick, UWORD flags, MP_CONTROL *a, UBYTE style) | |||
546 | static int DoPTEffect0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 546 | static int DoPTEffect0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
547 | { | 547 | { |
548 | UBYTE dat; | 548 | UBYTE dat; |
549 | (void)mod; | ||
550 | (void)channel; | ||
549 | 551 | ||
550 | dat = UniGetByte(); | 552 | dat = UniGetByte(); |
551 | if (!tick) { | 553 | if (!tick) { |
@@ -563,6 +565,9 @@ static int DoPTEffect0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
563 | static int DoPTEffect1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 565 | static int DoPTEffect1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
564 | { | 566 | { |
565 | UBYTE dat; | 567 | UBYTE dat; |
568 | (void)flags; | ||
569 | (void)mod; | ||
570 | (void)channel; | ||
566 | 571 | ||
567 | dat = UniGetByte(); | 572 | dat = UniGetByte(); |
568 | if (!tick && dat) | 573 | if (!tick && dat) |
@@ -577,6 +582,9 @@ static int DoPTEffect1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
577 | static int DoPTEffect2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 582 | static int DoPTEffect2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
578 | { | 583 | { |
579 | UBYTE dat; | 584 | UBYTE dat; |
585 | (void)flags; | ||
586 | (void)mod; | ||
587 | (void)channel; | ||
580 | 588 | ||
581 | dat = UniGetByte(); | 589 | dat = UniGetByte(); |
582 | if (!tick && dat) | 590 | if (!tick && dat) |
@@ -621,6 +629,9 @@ static void DoToneSlide(UWORD tick, MP_CONTROL *a) | |||
621 | static int DoPTEffect3(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 629 | static int DoPTEffect3(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
622 | { | 630 | { |
623 | UBYTE dat; | 631 | UBYTE dat; |
632 | (void)flags; | ||
633 | (void)mod; | ||
634 | (void)channel; | ||
624 | 635 | ||
625 | dat=UniGetByte(); | 636 | dat=UniGetByte(); |
626 | if ((!tick)&&(dat)) a->portspeed=(UWORD)dat<<2; | 637 | if ((!tick)&&(dat)) a->portspeed=(UWORD)dat<<2; |
@@ -673,6 +684,9 @@ static void DoVibrato(UWORD tick, MP_CONTROL *a) | |||
673 | static int DoPTEffect4(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 684 | static int DoPTEffect4(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
674 | { | 685 | { |
675 | UBYTE dat; | 686 | UBYTE dat; |
687 | (void)flags; | ||
688 | (void)mod; | ||
689 | (void)channel; | ||
676 | 690 | ||
677 | dat=UniGetByte(); | 691 | dat=UniGetByte(); |
678 | if (!tick) { | 692 | if (!tick) { |
@@ -701,6 +715,9 @@ static void DoVolSlide(MP_CONTROL *a, UBYTE dat) | |||
701 | static int DoPTEffect5(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 715 | static int DoPTEffect5(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
702 | { | 716 | { |
703 | UBYTE dat; | 717 | UBYTE dat; |
718 | (void)flags; | ||
719 | (void)mod; | ||
720 | (void)channel; | ||
704 | 721 | ||
705 | dat=UniGetByte(); | 722 | dat=UniGetByte(); |
706 | if (a->main.period) | 723 | if (a->main.period) |
@@ -719,6 +736,9 @@ static int DoPTEffect7(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
719 | UBYTE dat; | 736 | UBYTE dat; |
720 | UBYTE q; | 737 | UBYTE q; |
721 | UWORD temp = 0; /* silence warning */ | 738 | UWORD temp = 0; /* silence warning */ |
739 | (void)flags; | ||
740 | (void)mod; | ||
741 | (void)channel; | ||
722 | 742 | ||
723 | dat=UniGetByte(); | 743 | dat=UniGetByte(); |
724 | if (!tick) { | 744 | if (!tick) { |
@@ -766,6 +786,8 @@ static int DoPTEffect7(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
766 | static int DoPTEffect8(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 786 | static int DoPTEffect8(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
767 | { | 787 | { |
768 | UBYTE dat; | 788 | UBYTE dat; |
789 | (void)tick; | ||
790 | (void)flags; | ||
769 | 791 | ||
770 | dat = UniGetByte(); | 792 | dat = UniGetByte(); |
771 | if (mod->panflag) | 793 | if (mod->panflag) |
@@ -777,13 +799,16 @@ static int DoPTEffect8(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
777 | static int DoPTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 799 | static int DoPTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
778 | { | 800 | { |
779 | UBYTE dat; | 801 | UBYTE dat; |
802 | (void)flags; | ||
803 | (void)mod; | ||
804 | (void)channel; | ||
780 | 805 | ||
781 | dat=UniGetByte(); | 806 | dat=UniGetByte(); |
782 | if (!tick) { | 807 | if (!tick) { |
783 | if (dat) a->soffset=(UWORD)dat<<8; | 808 | if (dat) a->soffset=(UWORD)dat<<8; |
784 | a->main.start=a->hioffset|a->soffset; | 809 | a->main.start=a->hioffset|a->soffset; |
785 | 810 | ||
786 | if ((a->main.s)&&(a->main.start>a->main.s->length)) | 811 | if ((a->main.s)&&(a->main.start > (SLONG)a->main.s->length)) |
787 | a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)? | 812 | a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)? |
788 | a->main.s->loopstart:a->main.s->length; | 813 | a->main.s->loopstart:a->main.s->length; |
789 | } | 814 | } |
@@ -794,6 +819,9 @@ static int DoPTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
794 | static int DoPTEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 819 | static int DoPTEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
795 | { | 820 | { |
796 | UBYTE dat; | 821 | UBYTE dat; |
822 | (void)flags; | ||
823 | (void)mod; | ||
824 | (void)channel; | ||
797 | 825 | ||
798 | dat=UniGetByte(); | 826 | dat=UniGetByte(); |
799 | if (tick) | 827 | if (tick) |
@@ -814,6 +842,8 @@ static int DoPTEffect6(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
814 | static int DoPTEffectB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 842 | static int DoPTEffectB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
815 | { | 843 | { |
816 | UBYTE dat; | 844 | UBYTE dat; |
845 | (void)a; | ||
846 | (void)channel; | ||
817 | 847 | ||
818 | dat=UniGetByte(); | 848 | dat=UniGetByte(); |
819 | 849 | ||
@@ -848,6 +878,9 @@ static int DoPTEffectB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
848 | static int DoPTEffectC(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 878 | static int DoPTEffectC(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
849 | { | 879 | { |
850 | UBYTE dat; | 880 | UBYTE dat; |
881 | (void)flags; | ||
882 | (void)mod; | ||
883 | (void)channel; | ||
851 | 884 | ||
852 | dat=UniGetByte(); | 885 | dat=UniGetByte(); |
853 | if (tick) return 0; | 886 | if (tick) return 0; |
@@ -861,6 +894,8 @@ static int DoPTEffectC(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
861 | static int DoPTEffectD(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 894 | static int DoPTEffectD(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
862 | { | 895 | { |
863 | UBYTE dat; | 896 | UBYTE dat; |
897 | (void)a; | ||
898 | (void)channel; | ||
864 | 899 | ||
865 | dat=UniGetByte(); | 900 | dat=UniGetByte(); |
866 | if ((tick)||(mod->patdly2)) return 0; | 901 | if ((tick)||(mod->patdly2)) return 0; |
@@ -1022,6 +1057,9 @@ static int DoPTEffectE(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1022 | static int DoPTEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1057 | static int DoPTEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1023 | { | 1058 | { |
1024 | UBYTE dat; | 1059 | UBYTE dat; |
1060 | (void)flags; | ||
1061 | (void)a; | ||
1062 | (void)channel; | ||
1025 | 1063 | ||
1026 | dat=UniGetByte(); | 1064 | dat=UniGetByte(); |
1027 | if (tick||mod->patdly2) return 0; | 1065 | if (tick||mod->patdly2) return 0; |
@@ -1041,6 +1079,9 @@ static int DoPTEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1041 | static int DoS3MEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1079 | static int DoS3MEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1042 | { | 1080 | { |
1043 | UBYTE speed; | 1081 | UBYTE speed; |
1082 | (void)flags; | ||
1083 | (void)a; | ||
1084 | (void)channel; | ||
1044 | 1085 | ||
1045 | speed = UniGetByte(); | 1086 | speed = UniGetByte(); |
1046 | 1087 | ||
@@ -1091,6 +1132,9 @@ static void DoS3MVolSlide(UWORD tick, UWORD flags, MP_CONTROL *a, UBYTE inf) | |||
1091 | 1132 | ||
1092 | static int DoS3MEffectD(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1133 | static int DoS3MEffectD(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1093 | { | 1134 | { |
1135 | (void)mod; | ||
1136 | (void)channel; | ||
1137 | |||
1094 | DoS3MVolSlide(tick, flags, a, UniGetByte()); | 1138 | DoS3MVolSlide(tick, flags, a, UniGetByte()); |
1095 | 1139 | ||
1096 | return 1; | 1140 | return 1; |
@@ -1121,6 +1165,9 @@ static void DoS3MSlideDn(UWORD tick, MP_CONTROL *a, UBYTE inf) | |||
1121 | static int DoS3MEffectE(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1165 | static int DoS3MEffectE(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1122 | { | 1166 | { |
1123 | UBYTE dat; | 1167 | UBYTE dat; |
1168 | (void)flags; | ||
1169 | (void)mod; | ||
1170 | (void)channel; | ||
1124 | 1171 | ||
1125 | dat=UniGetByte(); | 1172 | dat=UniGetByte(); |
1126 | if (a->main.period) | 1173 | if (a->main.period) |
@@ -1152,6 +1199,9 @@ static void DoS3MSlideUp(UWORD tick, MP_CONTROL *a, UBYTE inf) | |||
1152 | static int DoS3MEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1199 | static int DoS3MEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1153 | { | 1200 | { |
1154 | UBYTE dat; | 1201 | UBYTE dat; |
1202 | (void)flags; | ||
1203 | (void)mod; | ||
1204 | (void)channel; | ||
1155 | 1205 | ||
1156 | dat=UniGetByte(); | 1206 | dat=UniGetByte(); |
1157 | if (a->main.period) | 1207 | if (a->main.period) |
@@ -1163,6 +1213,9 @@ static int DoS3MEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1163 | static int DoS3MEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1213 | static int DoS3MEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1164 | { | 1214 | { |
1165 | UBYTE inf, on, off; | 1215 | UBYTE inf, on, off; |
1216 | (void)flags; | ||
1217 | (void)mod; | ||
1218 | (void)channel; | ||
1166 | 1219 | ||
1167 | inf = UniGetByte(); | 1220 | inf = UniGetByte(); |
1168 | if (inf) | 1221 | if (inf) |
@@ -1189,6 +1242,8 @@ static int DoS3MEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1189 | static int DoS3MEffectQ(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1242 | static int DoS3MEffectQ(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1190 | { | 1243 | { |
1191 | UBYTE inf; | 1244 | UBYTE inf; |
1245 | (void)mod; | ||
1246 | (void)channel; | ||
1192 | 1247 | ||
1193 | inf = UniGetByte(); | 1248 | inf = UniGetByte(); |
1194 | if (a->main.period) { | 1249 | if (a->main.period) { |
@@ -1251,6 +1306,9 @@ static int DoS3MEffectR(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1251 | { | 1306 | { |
1252 | UBYTE dat, q; | 1307 | UBYTE dat, q; |
1253 | UWORD temp=0; /* silence warning */ | 1308 | UWORD temp=0; /* silence warning */ |
1309 | (void)flags; | ||
1310 | (void)mod; | ||
1311 | (void)channel; | ||
1254 | 1312 | ||
1255 | dat = UniGetByte(); | 1313 | dat = UniGetByte(); |
1256 | if (!tick) { | 1314 | if (!tick) { |
@@ -1298,6 +1356,9 @@ static int DoS3MEffectR(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1298 | static int DoS3MEffectT(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1356 | static int DoS3MEffectT(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1299 | { | 1357 | { |
1300 | UBYTE tempo; | 1358 | UBYTE tempo; |
1359 | (void)flags; | ||
1360 | (void)a; | ||
1361 | (void)channel; | ||
1301 | 1362 | ||
1302 | tempo = UniGetByte(); | 1363 | tempo = UniGetByte(); |
1303 | 1364 | ||
@@ -1313,6 +1374,9 @@ static int DoS3MEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1313 | { | 1374 | { |
1314 | UBYTE dat, q; | 1375 | UBYTE dat, q; |
1315 | UWORD temp = 0; /* silence warning */ | 1376 | UWORD temp = 0; /* silence warning */ |
1377 | (void)flags; | ||
1378 | (void)mod; | ||
1379 | (void)channel; | ||
1316 | 1380 | ||
1317 | dat = UniGetByte(); | 1381 | dat = UniGetByte(); |
1318 | if (!tick) { | 1382 | if (!tick) { |
@@ -1358,6 +1422,10 @@ static int DoS3MEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1358 | 1422 | ||
1359 | static int DoKeyOff(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1423 | static int DoKeyOff(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1360 | { | 1424 | { |
1425 | (void)tick; | ||
1426 | (void)flags; | ||
1427 | (void)mod; | ||
1428 | (void)channel; | ||
1361 | a->main.keyoff|=KEY_OFF; | 1429 | a->main.keyoff|=KEY_OFF; |
1362 | if ((!(a->main.volflg&EF_ON))||(a->main.volflg&EF_LOOP)) | 1430 | if ((!(a->main.volflg&EF_ON))||(a->main.volflg&EF_LOOP)) |
1363 | a->main.keyoff=KEY_KILL; | 1431 | a->main.keyoff=KEY_KILL; |
@@ -1368,6 +1436,8 @@ static int DoKeyOff(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD c | |||
1368 | static int DoKeyFade(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1436 | static int DoKeyFade(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1369 | { | 1437 | { |
1370 | UBYTE dat; | 1438 | UBYTE dat; |
1439 | (void)flags; | ||
1440 | (void)channel; | ||
1371 | 1441 | ||
1372 | dat=UniGetByte(); | 1442 | dat=UniGetByte(); |
1373 | if ((tick>=dat)||(tick==mod->sngspd-1)) { | 1443 | if ((tick>=dat)||(tick==mod->sngspd-1)) { |
@@ -1386,6 +1456,9 @@ static int DoKeyFade(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD | |||
1386 | static int DoXMEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1456 | static int DoXMEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1387 | { | 1457 | { |
1388 | UBYTE inf, lo, hi; | 1458 | UBYTE inf, lo, hi; |
1459 | (void)flags; | ||
1460 | (void)mod; | ||
1461 | (void)channel; | ||
1389 | 1462 | ||
1390 | inf = UniGetByte(); | 1463 | inf = UniGetByte(); |
1391 | if (inf) | 1464 | if (inf) |
@@ -1411,6 +1484,9 @@ static int DoXMEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1411 | 1484 | ||
1412 | static int DoXMEffect6(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1485 | static int DoXMEffect6(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1413 | { | 1486 | { |
1487 | (void)flags; | ||
1488 | (void)mod; | ||
1489 | (void)channel; | ||
1414 | if (a->main.period) | 1490 | if (a->main.period) |
1415 | DoVibrato(tick, a); | 1491 | DoVibrato(tick, a); |
1416 | 1492 | ||
@@ -1420,6 +1496,9 @@ static int DoXMEffect6(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1420 | static int DoXMEffectE1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1496 | static int DoXMEffectE1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1421 | { | 1497 | { |
1422 | UBYTE dat; | 1498 | UBYTE dat; |
1499 | (void)flags; | ||
1500 | (void)mod; | ||
1501 | (void)channel; | ||
1423 | 1502 | ||
1424 | dat=UniGetByte(); | 1503 | dat=UniGetByte(); |
1425 | if (!tick) { | 1504 | if (!tick) { |
@@ -1434,6 +1513,9 @@ static int DoXMEffectE1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1434 | static int DoXMEffectE2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1513 | static int DoXMEffectE2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1435 | { | 1514 | { |
1436 | UBYTE dat; | 1515 | UBYTE dat; |
1516 | (void)flags; | ||
1517 | (void)mod; | ||
1518 | (void)channel; | ||
1437 | 1519 | ||
1438 | dat=UniGetByte(); | 1520 | dat=UniGetByte(); |
1439 | if (!tick) { | 1521 | if (!tick) { |
@@ -1448,6 +1530,9 @@ static int DoXMEffectE2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1448 | static int DoXMEffectEA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1530 | static int DoXMEffectEA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1449 | { | 1531 | { |
1450 | UBYTE dat; | 1532 | UBYTE dat; |
1533 | (void)flags; | ||
1534 | (void)mod; | ||
1535 | (void)channel; | ||
1451 | 1536 | ||
1452 | dat=UniGetByte(); | 1537 | dat=UniGetByte(); |
1453 | if (!tick) | 1538 | if (!tick) |
@@ -1461,6 +1546,9 @@ static int DoXMEffectEA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1461 | static int DoXMEffectEB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1546 | static int DoXMEffectEB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1462 | { | 1547 | { |
1463 | UBYTE dat; | 1548 | UBYTE dat; |
1549 | (void)flags; | ||
1550 | (void)mod; | ||
1551 | (void)channel; | ||
1464 | 1552 | ||
1465 | dat=UniGetByte(); | 1553 | dat=UniGetByte(); |
1466 | if (!tick) | 1554 | if (!tick) |
@@ -1473,6 +1561,10 @@ static int DoXMEffectEB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1473 | 1561 | ||
1474 | static int DoXMEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1562 | static int DoXMEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1475 | { | 1563 | { |
1564 | (void)tick; | ||
1565 | (void)flags; | ||
1566 | (void)a; | ||
1567 | (void)channel; | ||
1476 | mod->volume=UniGetByte()<<1; | 1568 | mod->volume=UniGetByte()<<1; |
1477 | if (mod->volume>128) mod->volume=128; | 1569 | if (mod->volume>128) mod->volume=128; |
1478 | 1570 | ||
@@ -1482,6 +1574,9 @@ static int DoXMEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1482 | static int DoXMEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1574 | static int DoXMEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1483 | { | 1575 | { |
1484 | UBYTE inf; | 1576 | UBYTE inf; |
1577 | (void)flags; | ||
1578 | (void)a; | ||
1579 | (void)channel; | ||
1485 | 1580 | ||
1486 | inf = UniGetByte(); | 1581 | inf = UniGetByte(); |
1487 | 1582 | ||
@@ -1503,6 +1598,9 @@ static int DoXMEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1503 | static int DoXMEffectL(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1598 | static int DoXMEffectL(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1504 | { | 1599 | { |
1505 | UBYTE dat; | 1600 | UBYTE dat; |
1601 | (void)flags; | ||
1602 | (void)mod; | ||
1603 | (void)channel; | ||
1506 | 1604 | ||
1507 | dat=UniGetByte(); | 1605 | dat=UniGetByte(); |
1508 | if ((!tick)&&(a->main.i)) { | 1606 | if ((!tick)&&(a->main.i)) { |
@@ -1529,6 +1627,8 @@ static int DoXMEffectP(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1529 | { | 1627 | { |
1530 | UBYTE inf, lo, hi; | 1628 | UBYTE inf, lo, hi; |
1531 | SWORD pan; | 1629 | SWORD pan; |
1630 | (void)flags; | ||
1631 | (void)channel; | ||
1532 | 1632 | ||
1533 | inf = UniGetByte(); | 1633 | inf = UniGetByte(); |
1534 | if (!mod->panflag) | 1634 | if (!mod->panflag) |
@@ -1557,6 +1657,9 @@ static int DoXMEffectP(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1557 | static int DoXMEffectX1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1657 | static int DoXMEffectX1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1558 | { | 1658 | { |
1559 | UBYTE dat; | 1659 | UBYTE dat; |
1660 | (void)flags; | ||
1661 | (void)mod; | ||
1662 | (void)channel; | ||
1560 | 1663 | ||
1561 | dat = UniGetByte(); | 1664 | dat = UniGetByte(); |
1562 | if (dat) | 1665 | if (dat) |
@@ -1577,6 +1680,9 @@ static int DoXMEffectX1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1577 | static int DoXMEffectX2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1680 | static int DoXMEffectX2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1578 | { | 1681 | { |
1579 | UBYTE dat; | 1682 | UBYTE dat; |
1683 | (void)flags; | ||
1684 | (void)mod; | ||
1685 | (void)channel; | ||
1580 | 1686 | ||
1581 | dat = UniGetByte(); | 1687 | dat = UniGetByte(); |
1582 | if (dat) | 1688 | if (dat) |
@@ -1638,6 +1744,9 @@ static void DoITToneSlide(UWORD tick, MP_CONTROL *a, UBYTE dat) | |||
1638 | 1744 | ||
1639 | static int DoITEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1745 | static int DoITEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1640 | { | 1746 | { |
1747 | (void)flags; | ||
1748 | (void)mod; | ||
1749 | (void)channel; | ||
1641 | DoITToneSlide(tick, a, UniGetByte()); | 1750 | DoITToneSlide(tick, a, UniGetByte()); |
1642 | 1751 | ||
1643 | return 0; | 1752 | return 0; |
@@ -1689,6 +1798,9 @@ static void DoITVibrato(UWORD tick, MP_CONTROL *a, UBYTE dat) | |||
1689 | 1798 | ||
1690 | static int DoITEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1799 | static int DoITEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1691 | { | 1800 | { |
1801 | (void)flags; | ||
1802 | (void)mod; | ||
1803 | (void)channel; | ||
1692 | DoITVibrato(tick, a, UniGetByte()); | 1804 | DoITVibrato(tick, a, UniGetByte()); |
1693 | 1805 | ||
1694 | return 0; | 1806 | return 0; |
@@ -1697,6 +1809,10 @@ static int DoITEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1697 | static int DoITEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1809 | static int DoITEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1698 | { | 1810 | { |
1699 | UBYTE inf, on, off; | 1811 | UBYTE inf, on, off; |
1812 | (void)tick; | ||
1813 | (void)flags; | ||
1814 | (void)mod; | ||
1815 | (void)channel; | ||
1700 | 1816 | ||
1701 | inf = UniGetByte(); | 1817 | inf = UniGetByte(); |
1702 | if (inf) | 1818 | if (inf) |
@@ -1720,6 +1836,10 @@ static int DoITEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1720 | 1836 | ||
1721 | static int DoITEffectM(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1837 | static int DoITEffectM(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1722 | { | 1838 | { |
1839 | (void)tick; | ||
1840 | (void)flags; | ||
1841 | (void)mod; | ||
1842 | (void)channel; | ||
1723 | a->main.chanvol=UniGetByte(); | 1843 | a->main.chanvol=UniGetByte(); |
1724 | if (a->main.chanvol>64) | 1844 | if (a->main.chanvol>64) |
1725 | a->main.chanvol=64; | 1845 | a->main.chanvol=64; |
@@ -1732,6 +1852,10 @@ static int DoITEffectM(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1732 | static int DoITEffectN(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 1852 | static int DoITEffectN(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1733 | { | 1853 | { |
1734 | UBYTE inf, lo, hi; | 1854 | UBYTE inf, lo, hi; |
1855 | (void)tick; | ||
1856 | (void)flags; | ||
1857 | (void)mod; | ||
1858 | (void)channel; | ||
1735 | 1859 | ||
1736 | inf = UniGetByte(); | 1860 | inf = UniGetByte(); |
1737 | 1861 | ||
@@ -1768,6 +1892,9 @@ static int DoITEffectP(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1768 | { | 1892 | { |
1769 | UBYTE inf, lo, hi; | 1893 | UBYTE inf, lo, hi; |
1770 | SWORD pan; | 1894 | SWORD pan; |
1895 | (void)flags; | ||
1896 | (void)mod; | ||
1897 | (void)channel; | ||
1771 | 1898 | ||
1772 | inf = UniGetByte(); | 1899 | inf = UniGetByte(); |
1773 | if (inf) | 1900 | if (inf) |
@@ -1805,6 +1932,10 @@ static int DoITEffectT(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1805 | { | 1932 | { |
1806 | UBYTE tempo; | 1933 | UBYTE tempo; |
1807 | SWORD temp; | 1934 | SWORD temp; |
1935 | (void)tick; | ||
1936 | (void)flags; | ||
1937 | (void)a; | ||
1938 | (void)channel; | ||
1808 | 1939 | ||
1809 | tempo = UniGetByte(); | 1940 | tempo = UniGetByte(); |
1810 | 1941 | ||
@@ -1826,6 +1957,9 @@ static int DoITEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1826 | { | 1957 | { |
1827 | UBYTE dat, q; | 1958 | UBYTE dat, q; |
1828 | UWORD temp = 0; /* silence warning */ | 1959 | UWORD temp = 0; /* silence warning */ |
1960 | (void)flags; | ||
1961 | (void)mod; | ||
1962 | (void)channel; | ||
1829 | 1963 | ||
1830 | dat = UniGetByte(); | 1964 | dat = UniGetByte(); |
1831 | if (!tick) { | 1965 | if (!tick) { |
@@ -1870,6 +2004,9 @@ static int DoITEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1870 | static int DoITEffectW(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 2004 | static int DoITEffectW(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
1871 | { | 2005 | { |
1872 | UBYTE inf, lo, hi; | 2006 | UBYTE inf, lo, hi; |
2007 | (void)flags; | ||
2008 | (void)a; | ||
2009 | (void)channel; | ||
1873 | 2010 | ||
1874 | inf = UniGetByte(); | 2011 | inf = UniGetByte(); |
1875 | 2012 | ||
@@ -1906,6 +2043,7 @@ static int DoITEffectY(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR | |||
1906 | { | 2043 | { |
1907 | UBYTE dat, q; | 2044 | UBYTE dat, q; |
1908 | SLONG temp = 0; /* silence warning */ | 2045 | SLONG temp = 0; /* silence warning */ |
2046 | (void)flags; | ||
1909 | 2047 | ||
1910 | 2048 | ||
1911 | dat=UniGetByte(); | 2049 | dat=UniGetByte(); |
@@ -1998,7 +2136,7 @@ static int DoITEffectS0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
1998 | a->hioffset=inf<<16; | 2136 | a->hioffset=inf<<16; |
1999 | a->main.start=a->hioffset|a->soffset; | 2137 | a->main.start=a->hioffset|a->soffset; |
2000 | 2138 | ||
2001 | if ((a->main.s)&&(a->main.start>a->main.s->length)) | 2139 | if ((a->main.s)&&(a->main.start > (SLONG)a->main.s->length)) |
2002 | a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)? | 2140 | a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)? |
2003 | a->main.s->loopstart:a->main.s->length; | 2141 | a->main.s->loopstart:a->main.s->length; |
2004 | } | 2142 | } |
@@ -2030,6 +2168,7 @@ static int DoITEffectS0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
2030 | static int DoVolEffects(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 2168 | static int DoVolEffects(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
2031 | { | 2169 | { |
2032 | UBYTE c, inf; | 2170 | UBYTE c, inf; |
2171 | (void)channel; | ||
2033 | 2172 | ||
2034 | c = UniGetByte(); | 2173 | c = UniGetByte(); |
2035 | inf = UniGetByte(); | 2174 | inf = UniGetByte(); |
@@ -2080,12 +2219,16 @@ static int DoVolEffects(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
2080 | static int DoULTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 2219 | static int DoULTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
2081 | { | 2220 | { |
2082 | UWORD offset=UniGetWord(); | 2221 | UWORD offset=UniGetWord(); |
2222 | (void)tick; | ||
2223 | (void)flags; | ||
2224 | (void)mod; | ||
2225 | (void)channel; | ||
2083 | 2226 | ||
2084 | if (offset) | 2227 | if (offset) |
2085 | a->ultoffset=offset; | 2228 | a->ultoffset=offset; |
2086 | 2229 | ||
2087 | a->main.start=a->ultoffset<<2; | 2230 | a->main.start=a->ultoffset<<2; |
2088 | if ((a->main.s)&&(a->main.start>a->main.s->length)) | 2231 | if ((a->main.s)&&(a->main.start > (SLONG)a->main.s->length)) |
2089 | a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)? | 2232 | a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)? |
2090 | a->main.s->loopstart:a->main.s->length; | 2233 | a->main.s->loopstart:a->main.s->length; |
2091 | 2234 | ||
@@ -2097,6 +2240,10 @@ static int DoULTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO | |||
2097 | static int DoMEDSpeed(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 2240 | static int DoMEDSpeed(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
2098 | { | 2241 | { |
2099 | UWORD speed=UniGetWord(); | 2242 | UWORD speed=UniGetWord(); |
2243 | (void)tick; | ||
2244 | (void)flags; | ||
2245 | (void)a; | ||
2246 | (void)channel; | ||
2100 | 2247 | ||
2101 | mod->bpm=speed; | 2248 | mod->bpm=speed; |
2102 | 2249 | ||
@@ -2129,6 +2276,8 @@ static int DoMEDEffectF3(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SW | |||
2129 | static int DoOktArp(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 2276 | static int DoOktArp(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
2130 | { | 2277 | { |
2131 | UBYTE dat, dat2; | 2278 | UBYTE dat, dat2; |
2279 | (void)mod; | ||
2280 | (void)channel; | ||
2132 | 2281 | ||
2133 | dat2 = UniGetByte(); /* arpeggio style */ | 2282 | dat2 = UniGetByte(); /* arpeggio style */ |
2134 | dat = UniGetByte(); | 2283 | dat = UniGetByte(); |
@@ -2148,6 +2297,11 @@ static int DoOktArp(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD c | |||
2148 | 2297 | ||
2149 | static int DoNothing(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) | 2298 | static int DoNothing(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel) |
2150 | { | 2299 | { |
2300 | (void)tick; | ||
2301 | (void)flags; | ||
2302 | (void)a; | ||
2303 | (void)mod; | ||
2304 | (void)channel; | ||
2151 | UniSkipOpcode(); | 2305 | UniSkipOpcode(); |
2152 | 2306 | ||
2153 | return 0; | 2307 | return 0; |
@@ -2330,7 +2484,7 @@ void pt_UpdateVoices(MODULE *mod, int max_volume) | |||
2330 | 2484 | ||
2331 | if ((aout->main.kick==KICK_NOTE)||(aout->main.kick==KICK_KEYOFF)) { | 2485 | if ((aout->main.kick==KICK_NOTE)||(aout->main.kick==KICK_KEYOFF)) { |
2332 | Voice_Play_internal(channel,s,(aout->main.start==-1)? | 2486 | Voice_Play_internal(channel,s,(aout->main.start==-1)? |
2333 | ((s->flags&SF_UST_LOOP)?s->loopstart:0):aout->main.start); | 2487 | ((s->flags&SF_UST_LOOP) ? (SLONG)s->loopstart : 0) : aout->main.start); |
2334 | aout->main.fadevol=32768; | 2488 | aout->main.fadevol=32768; |
2335 | aout->aswppos=0; | 2489 | aout->aswppos=0; |
2336 | } | 2490 | } |
@@ -3242,7 +3396,7 @@ MIKMODAPI void Player_Mute(SLONG arg1,...) | |||
3242 | static void Player_ToggleMute_internal(SLONG arg1,va_list ap) | 3396 | static void Player_ToggleMute_internal(SLONG arg1,va_list ap) |
3243 | { | 3397 | { |
3244 | SLONG arg2,arg3=0; | 3398 | SLONG arg2,arg3=0; |
3245 | ULONG t; | 3399 | SLONG t; |
3246 | 3400 | ||
3247 | if (pf) { | 3401 | if (pf) { |
3248 | switch (arg1) { | 3402 | switch (arg1) { |
diff --git a/apps/plugins/mikmod/virtch.c b/apps/plugins/mikmod/virtch.c index 43a61a3c2c..6e8174016c 100644 --- a/apps/plugins/mikmod/virtch.c +++ b/apps/plugins/mikmod/virtch.c | |||
@@ -1134,7 +1134,7 @@ void VC1_WriteSamples(SBYTE* buf,ULONG todo) | |||
1134 | if(vc_mode & DMODE_SOFT_MUSIC) md_player(); | 1134 | if(vc_mode & DMODE_SOFT_MUSIC) md_player(); |
1135 | tickleft=(md_mixfreq*125L)/(md_bpm*50L); | 1135 | tickleft=(md_mixfreq*125L)/(md_bpm*50L); |
1136 | } | 1136 | } |
1137 | left = MIN(tickleft, todo); | 1137 | left = MIN(tickleft, (int)todo); |
1138 | buffer = buf; | 1138 | buffer = buf; |
1139 | tickleft -= left; | 1139 | tickleft -= left; |
1140 | todo -= left; | 1140 | todo -= left; |
diff --git a/apps/plugins/mikmod/virtch_common.c b/apps/plugins/mikmod/virtch_common.c index 522f4509f0..e13f6d1c51 100644 --- a/apps/plugins/mikmod/virtch_common.c +++ b/apps/plugins/mikmod/virtch_common.c | |||
@@ -416,11 +416,13 @@ SWORD VC1_SampleLoad(struct SAMPLOAD* sload,int type) | |||
416 | 416 | ||
417 | ULONG VC1_SampleSpace(int type) | 417 | ULONG VC1_SampleSpace(int type) |
418 | { | 418 | { |
419 | (void)type; | ||
419 | return vc_memory; | 420 | return vc_memory; |
420 | } | 421 | } |
421 | 422 | ||
422 | ULONG VC1_SampleLength(int type,SAMPLE* s) | 423 | ULONG VC1_SampleLength(int type,SAMPLE* s) |
423 | { | 424 | { |
425 | (void)type; | ||
424 | if (!s) return 0; | 426 | if (!s) return 0; |
425 | 427 | ||
426 | return (s->length*((s->flags&SF_16BITS)?2:1))+16; | 428 | return (s->length*((s->flags&SF_16BITS)?2:1))+16; |