summaryrefslogtreecommitdiffstats
path: root/apps/plugins/mikmod
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-09-03 23:17:42 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-09-03 23:17:42 +0000
commite2186479d56762d097b943696423ad8588ca7f92 (patch)
tree833fb9909a1842e1eb216a695d7bc507855be4e5 /apps/plugins/mikmod
parent7887e596a99fcaf2198d624bfedf5e2ad97a49cd (diff)
downloadrockbox-e2186479d56762d097b943696423ad8588ca7f92.tar.gz
rockbox-e2186479d56762d097b943696423ad8588ca7f92.tar.bz2
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')
-rw-r--r--apps/plugins/mikmod/load_669.c1
-rw-r--r--apps/plugins/mikmod/load_amf.c6
-rw-r--r--apps/plugins/mikmod/load_asy.c8
-rw-r--r--apps/plugins/mikmod/load_dsm.c1
-rw-r--r--apps/plugins/mikmod/load_far.c1
-rw-r--r--apps/plugins/mikmod/load_gdm.c1
-rw-r--r--apps/plugins/mikmod/load_gt2.c3
-rw-r--r--apps/plugins/mikmod/load_imf.c15
-rw-r--r--apps/plugins/mikmod/load_it.c14
-rw-r--r--apps/plugins/mikmod/load_m15.c7
-rw-r--r--apps/plugins/mikmod/load_mod.c3
-rw-r--r--apps/plugins/mikmod/load_mtm.c3
-rw-r--r--apps/plugins/mikmod/load_okt.c3
-rw-r--r--apps/plugins/mikmod/load_s3m.c6
-rw-r--r--apps/plugins/mikmod/load_stm.c4
-rw-r--r--apps/plugins/mikmod/load_ult.c1
-rw-r--r--apps/plugins/mikmod/load_uni.c3
-rw-r--r--apps/plugins/mikmod/load_xm.c5
-rw-r--r--apps/plugins/mikmod/mikmod.c22
-rw-r--r--apps/plugins/mikmod/mikmod.make2
-rw-r--r--apps/plugins/mikmod/mikmod_internals.h2
-rw-r--r--apps/plugins/mikmod/mlutil.c2
-rw-r--r--apps/plugins/mikmod/mmalloc.c4
-rw-r--r--apps/plugins/mikmod/mmio.c12
-rw-r--r--apps/plugins/mikmod/mplayer.c164
-rw-r--r--apps/plugins/mikmod/virtch.c2
-rw-r--r--apps/plugins/mikmod/virtch_common.c2
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)
int i;
SAMPLE *current;
S69SAMPLE sample;
+ (void)curious;
/* module header */
_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)
int AMF_Load(int curious)
{
- int t,u,realtrackcnt,realsmpcnt,defaultpanning;
+ int u,defaultpanning;
+ unsigned int t,realtrackcnt,realsmpcnt;
AMFSAMPLE s;
SAMPLE *q;
UWORD *track_remap;
ULONG samplepos;
int channel_remap[16];
+ (void)curious;
/* try to read module header */
_mm_read_UBYTES(mh->id,3,modreader);
@@ -505,7 +507,7 @@ int AMF_Load(int curious)
realtrackcnt=track_remap[t];
for(t=0;t<of.numpat*of.numchn;t++)
of.patterns[t]=(of.patterns[t]<=mh->numtracks)?
- track_remap[of.patterns[t]]-1:realtrackcnt;
+ track_remap[of.patterns[t]]-1:(int)realtrackcnt;
MikMod_free(track_remap);
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)
/* Loads all patterns of a modfile and converts them into the 3 byte format. */
static int ML_LoadPatterns(void)
{
- int t, s, tracks = 0;
+ int t, tracks = 0;
+ unsigned int s;
if (!AllocPatterns()) {
return 0;
@@ -277,6 +278,7 @@ static int ASY_Load(int curious)
MSAMPINFO *s;
CHAR *descr=asylum;
ULONG seekpos;
+ (void)curious;
// no title in asylum amf files :(
strcpy(mh->songname, "");
@@ -286,7 +288,7 @@ static int ASY_Load(int curious)
mh->num_orders = _mm_read_UBYTE(modreader);
// skip unknown byte
- _mm_read_UBYTE(modreader);
+ (void)_mm_read_UBYTE(modreader);
_mm_read_UBYTES(mh->positions, 256, modreader);
/* read samples headers*/
@@ -300,7 +302,7 @@ static int ASY_Load(int curious)
s->finetune = _mm_read_UBYTE(modreader);
s->volume = _mm_read_UBYTE(modreader);
- _mm_read_UBYTE(modreader); // skip unknown byte
+ (void)_mm_read_UBYTE(modreader); // skip unknown byte
s->length = _mm_read_I_ULONG(modreader);
s->reppos = _mm_read_I_ULONG(modreader);
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)
DSMINST s;
SAMPLE *q;
int cursmp=0,curpat=0,track=0;
+ (void)curious;
blocklp=0;
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)
FARSAMPLE s;
FARNOTE *crow;
UBYTE smap[8];
+ (void)curious;
/* try to read module header (first part) */
_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)
SAMPLE *q;
GDMSAMPLE s;
ULONG position;
+ (void)curious;
/* read header */
_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)
_mm_read_M_ULONGS(&new_chunk->gt2.chunk_size, 1, modreader);
new_chunk->gt2.module_name[32] = 0;
_mm_read_UBYTES(&new_chunk->gt2.module_name, 32, modreader);
- new_chunk->gt2.module_name[160] = 0;
+ new_chunk->gt2.comments_author[160] = 0;
_mm_read_UBYTES(&new_chunk->gt2.comments_author, 160, modreader);
_mm_read_UBYTES(&new_chunk->gt2.date_day, 1, modreader);
_mm_read_UBYTES(&new_chunk->gt2.date_month, 1, modreader);
@@ -332,6 +332,7 @@ int GT2_Test(void)
int GT2_Load(int curious)
{
GT_CHUNK *tmp;
+ (void)curious;
_mm_fseek(modreader, 0, SEEK_SET);
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)
ULONG *nextwav=NULL;
UWORD wavcnt=0;
UBYTE id[4];
+ (void)curious;
/* try to read the module header */
_mm_read_string(mh->songname,32,modreader);
@@ -515,9 +516,9 @@ int IMF_Load(int curious)
ih. name##beg=_mm_read_UBYTE(modreader); \
ih. name##end=_mm_read_UBYTE(modreader); \
ih. name##flg=_mm_read_UBYTE(modreader); \
- _mm_read_UBYTE(modreader); \
- _mm_read_UBYTE(modreader); \
- _mm_read_UBYTE(modreader)
+ (void)_mm_read_UBYTE(modreader); \
+ (void)_mm_read_UBYTE(modreader); \
+ (void)_mm_read_UBYTE(modreader)
#else
#define IMF_FinishLoadingEnvelope(name) \
ih. name/**/pts=_mm_read_UBYTE(modreader); \
@@ -525,9 +526,9 @@ int IMF_Load(int curious)
ih. name/**/beg=_mm_read_UBYTE(modreader); \
ih. name/**/end=_mm_read_UBYTE(modreader); \
ih. name/**/flg=_mm_read_UBYTE(modreader); \
- _mm_read_UBYTE(modreader); \
- _mm_read_UBYTE(modreader); \
- _mm_read_UBYTE(modreader)
+ (void)_mm_read_UBYTE(modreader); \
+ (void)_mm_read_UBYTE(modreader); \
+ (void)_mm_read_UBYTE(modreader)
#endif
IMF_FinishLoadingEnvelope(vol);
@@ -626,7 +627,7 @@ int IMF_Load(int curious)
}
_mm_read_string(s->samplename,13,modreader);
- _mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);
+ (void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);
s->length =_mm_read_I_ULONG(modreader);
s->loopstart =_mm_read_I_ULONG(modreader);
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)
ch=(flag-1)&63;
remap[ch]=0;
if(flag & 128) mask[ch]=_mm_read_UBYTE(modreader);
- if(mask[ch]&1) _mm_read_UBYTE(modreader);
- if(mask[ch]&2) _mm_read_UBYTE(modreader);
- if(mask[ch]&4) _mm_read_UBYTE(modreader);
- if(mask[ch]&8) { _mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader); }
+ if(mask[ch]&1) (void)_mm_read_UBYTE(modreader);
+ if(mask[ch]&2) (void)_mm_read_UBYTE(modreader);
+ if(mask[ch]&4) (void)_mm_read_UBYTE(modreader);
+ if(mask[ch]&8) { (void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader); }
}
} while(row<patrows);
@@ -726,7 +726,7 @@ int IT_Load(int curious)
ih.trkvers = _mm_read_I_UWORD(modreader);
ih.numsmp = _mm_read_UBYTE(modreader);
- _mm_read_UBYTE(modreader);
+ (void)_mm_read_UBYTE(modreader);
_mm_read_string(ih.name,26,modreader);
_mm_read_UBYTES(ih.blank01,6,modreader);
_mm_read_I_UWORDS(ih.samptable,ITNOTECNT,modreader);
@@ -751,7 +751,7 @@ int IT_Load(int curious)
ih. name##node[lp]=_mm_read_##type (modreader); \
ih. name##tick[lp]=_mm_read_I_UWORD(modreader); \
} \
- _mm_read_UBYTE(modreader)
+ (void)_mm_read_UBYTE(modreader)
#else
#define IT_LoadEnvelope(name,type) \
ih. name/**/flg =_mm_read_UBYTE(modreader); \
@@ -764,7 +764,7 @@ int IT_Load(int curious)
ih. name/**/node[lp]=_mm_read_/**/type (modreader); \
ih. name/**/tick[lp]=_mm_read_I_UWORD(modreader); \
} \
- _mm_read_UBYTE(modreader)
+ (void)_mm_read_UBYTE(modreader)
#endif
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)
Returns: 0 indecisive; 1 = UST; 2 = 15-inst */
static int CheckPatternType(int numpat)
{
- int t;
+ unsigned int t;
UBYTE eff, dat;
for(t=0;t<numpat*(64U*4);t++) {
/* Load the pattern into the temp buffer and scan it */
- _mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);
+ (void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);
eff = _mm_read_UBYTE(modreader);
dat = _mm_read_UBYTE(modreader);
@@ -372,7 +372,8 @@ static UBYTE *M15_ConvertTrack(MODNOTE* n)
/* Loads all patterns of a modfile and converts them into the 3 byte format. */
static int M15_LoadPatterns(void)
{
- int t,s,tracks=0;
+ int t,tracks=0;
+ unsigned int s;
if(!AllocPatterns()) return 0;
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)
/* Loads all patterns of a modfile and converts them into the 3 byte format. */
static int ML_LoadPatterns(void)
{
- int t, s, tracks = 0;
+ int t, tracks = 0;
+ unsigned int s;
if (!AllocPatterns())
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)
int t,u;
MTMSAMPLE s;
SAMPLE *q;
+ (void)curious;
/* try to read module header */
_mm_read_UBYTES(mh->id,3,modreader);
@@ -219,7 +220,7 @@ int MTM_Load(int curious)
if(!AllocPositions(of.numpos)) return 0;
for(t=0;t<of.numpos;t++)
of.positions[t]=_mm_read_UBYTE(modreader);
- for(;t<128;t++) _mm_read_UBYTE(modreader);
+ for(;t<128;t++) (void)_mm_read_UBYTE(modreader);
if(_mm_eof(modreader)) {
_mm_errno = MMERR_LOADING_HEADER;
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)
s.len = _mm_read_M_ULONG(modreader);
s.loopbeg = _mm_read_M_UWORD(modreader) * 2;
s.looplen = _mm_read_M_UWORD(modreader) * 2;
- _mm_read_UBYTE(modreader);
+ (void)_mm_read_UBYTE(modreader);
s.volume = _mm_read_UBYTE(modreader);
_mm_read_M_UWORD(modreader);
@@ -330,6 +330,7 @@ int OKT_Load(int curious)
int seen_cmod = 0, seen_samp = 0, seen_slen = 0, seen_plen = 0, seen_patt
= 0, seen_spee = 0;
int patnum = 0, insnum = 0;
+ (void)curious;
/* skip OKTALYZER header */
_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)
if(flag) {
ch=flag&31;
if(mh->channels[ch]<32) remap[ch] = 0;
- if(flag&32) {_mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);}
- if(flag&64) _mm_read_UBYTE(modreader);
- if(flag&128){_mm_read_UBYTE(modreader);_mm_read_UBYTE(modreader);}
+ if(flag&32) {(void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);}
+ if(flag&64) (void)_mm_read_UBYTE(modreader);
+ if(flag&128){(void)_mm_read_UBYTE(modreader);(void)_mm_read_UBYTE(modreader);}
} else row++;
}
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)
static int STM_LoadPatterns(void)
{
- int t,s,tracks=0;
+ int t,tracks=0;
+ unsigned int s;
if(!AllocPatterns()) return 0;
if(!AllocTracks()) return 0;
@@ -254,6 +255,7 @@ int STM_Load(int curious)
int t;
ULONG MikMod_ISA; /* We must generate our own ISA, it's not stored in stm */
SAMPLE *q;
+ (void)curious;
/* try to read stm header */
_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)
ULTSAMPLE s;
ULTHEADER mh;
UBYTE nos,noc,rbnop;
+ (void)curious;
/* try to read module header */
_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)
char *modtype,*oldtype=NULL;
INSTRUMENT *d;
SAMPLE *q;
+ (void)curious;
/* read module header */
_mm_read_UBYTES(mh.id,4,modreader);
@@ -514,7 +515,7 @@ int UNI_Load(int curious)
if(universion>=6) {
if (universion==6)
- _mm_read_UBYTE(modreader);
+ (void)_mm_read_UBYTE(modreader);
else
universion=_mm_read_M_UWORD(modreader);
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)
/* read the remainder of the header
(2 bytes for 1.03, 22 for 1.04) */
- if (headend>=_mm_ftell(modreader)) for(u=headend-_mm_ftell(modreader);u;u--) _mm_read_UBYTE(modreader);
+ if (headend>=_mm_ftell(modreader)) for(u=headend-_mm_ftell(modreader);u;u--) (void)_mm_read_UBYTE(modreader);
/* we can't trust the envelope point count here, as some
modules have incorrect values (K_OSPACE.XM reports 32 volume
@@ -634,7 +634,7 @@ static int LoadInstruments(void)
break;
}
_mm_fseek(modreader,ck,SEEK_SET);
- for(u=headend-_mm_ftell(modreader);u;u--) _mm_read_UBYTE(modreader);
+ for(u=headend-_mm_ftell(modreader);u;u--) (void)_mm_read_UBYTE(modreader);
if(_mm_eof(modreader)) {
MikMod_free(nextwav);MikMod_free(wh);
@@ -664,6 +664,7 @@ int XM_Load(int curious)
int t,u;
int dummypat=0;
char tracker[21],modtype[60];
+ (void)curious;
/* try to read module header */
_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;
static size_t audio_buffer_free;
-/* The rockbox plugin interface */
-MEM_FUNCTION_WRAPPERS;
-
bool quit;
int playingtime IBSS_ATTR;
MODULE *module IBSS_ATTR;
@@ -147,10 +144,12 @@ void mmsupp_printf(const char *fmt, ...)
/************************* File Access ***************************/
/* support function for qsort() */
+/* not used
static int compare(const void* p1, const void* p2)
{
return rb->strcasecmp(*((char **)p1), *((char **)p2));
}
+*/
bool mod_ext(const char ext[])
{
@@ -290,7 +289,7 @@ void get_more(unsigned char** start, size_t* size)
#endif
}
-void showinfo()
+void showinfo(void)
{
char statustext[LINE_LENGTH];
@@ -348,9 +347,9 @@ void showinfo()
rb->lcd_update();
}
-void showsamples()
+void showsamples(void)
{
- int i, j;
+ int i;
char statustext[LINE_LENGTH];
if ( screenupdated )
@@ -367,9 +366,9 @@ void showsamples()
screenupdated = true;
}
-void showinstruments()
+void showinstruments(void)
{
- int i, j;
+ int i;
char statustext[LINE_LENGTH];
if ( screenupdated )
@@ -386,7 +385,7 @@ void showinstruments()
screenupdated = true;
}
-void showcomments()
+void showcomments(void)
{
int i, j=0, k=0, l;
char statustext[LINE_LENGTH];
@@ -425,7 +424,7 @@ void showcomments()
screenupdated = true;
}
-int changedisplay()
+void changedisplay(void)
{
display = (display+1) % 4;
@@ -494,7 +493,7 @@ static struct configdata config[] =
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, "CPU Boost", NULL},
};
-void applysettings()
+void applysettings(void)
{
md_pansep = settings.pansep;
md_reverb = settings.reverb;
@@ -525,7 +524,6 @@ void applysettings()
int settings_menu(void)
{
int selection = 0;
- bool old_val;
MENUITEM_STRINGLIST(settings_menu, "Mikmod Settings", NULL, "Panning Separation",
"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))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(MIKMOD_SRC)
-MIKMODCFLAGS = $(PLUGINFLAGS) -I$(MIKMODSRCDIR) -w
+MIKMODCFLAGS = $(PLUGINFLAGS) -I$(MIKMODSRCDIR)
ifeq ($(CPU),coldfire)
MIKMODCFLAGS += -O0
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*);
extern void _mm_iobase_revert(MREADER*);
extern int _mm_fopen(CHAR*,CHAR*);
extern int _mm_fclose(int);
+#if !defined(ROCKBOX)
extern void _mm_write_string(CHAR*,MWRITER*);
+#endif
extern int _mm_read_string (CHAR*,int,MREADER*);
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)
int speed_to_finetune(ULONG speed,int sample)
{
- int ctmp=0,tmp,note=1,finetune=0;
+ ULONG ctmp=0,tmp,note=1,finetune=0;
speed>>=1;
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 @@
#include "mikmod_internals.h"
#define ALIGN_STRIDE 16
-
+/* not used
static void * align_pointer(char *ptr, size_t stride)
{
char *pptr = ptr + sizeof(void*);
@@ -53,7 +53,7 @@ static void *get_pointer(void *data)
size_t _ptr = *(size_t*)_pptr;
return (void*)_ptr;
}
-
+*/
void* MikMod_realloc(void *data, size_t size)
{
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);
int _mm_fopen(CHAR* fname,CHAR* attrib)
{
int fp;
+ (void)attrib;
//if(!(fp=fopen(fname,attrib))) {
// _mm_errno = MMERR_OPENING_FILE;
@@ -212,11 +213,17 @@ static long _mm_FileWriter_Tell(MWRITER* writer)
static int _mm_FileWriter_Write(MWRITER* writer,void* ptr,size_t size)
{
//return (fwrite(ptr,size,1,((MFILEWRITER*)writer)->file)==size);
- return (write(ptr,size,((MFILEWRITER*)writer)->file)==size);
+ //return (write(ptr,size,((MFILEWRITER*)writer)->file)==(int)size);
+ (void)writer;
+ (void)ptr;
+ (void)size;
+ return 0;
}
static int _mm_FileWriter_Put(MWRITER* writer,int value)
{
+ (void)writer;
+ (void)value;
//return fputc(value,((MFILEWRITER*)writer)->file);
return 1; // TODO
}
@@ -292,7 +299,7 @@ static int _mm_MemReader_Read(MREADER* reader,void* ptr,size_t size)
s = ((MMEMREADER*)reader)->buffer;
s += ((MMEMREADER*)reader)->pos;
- if ( ((MMEMREADER*)reader)->pos + size > ((MMEMREADER*)reader)->len)
+ if ( ((MMEMREADER*)reader)->pos + (long)size > ((MMEMREADER*)reader)->len)
{
((MMEMREADER*)reader)->pos = ((MMEMREADER*)reader)->len;
return 0; /* not enough remaining bytes */
@@ -354,7 +361,6 @@ static long _mm_MemReader_Tell(MREADER* reader)
}
/*========== Write functions */
-
void _mm_write_string(CHAR* data,MWRITER* writer)
{
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)
static int DoPTEffect0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (!tick) {
@@ -563,6 +565,9 @@ static int DoPTEffect0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffect1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (!tick && dat)
@@ -577,6 +582,9 @@ static int DoPTEffect1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffect2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (!tick && dat)
@@ -621,6 +629,9 @@ static void DoToneSlide(UWORD tick, MP_CONTROL *a)
static int DoPTEffect3(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if ((!tick)&&(dat)) a->portspeed=(UWORD)dat<<2;
@@ -673,6 +684,9 @@ static void DoVibrato(UWORD tick, MP_CONTROL *a)
static int DoPTEffect4(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (!tick) {
@@ -701,6 +715,9 @@ static void DoVolSlide(MP_CONTROL *a, UBYTE dat)
static int DoPTEffect5(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (a->main.period)
@@ -719,6 +736,9 @@ static int DoPTEffect7(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
UBYTE dat;
UBYTE q;
UWORD temp = 0; /* silence warning */
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (!tick) {
@@ -766,6 +786,8 @@ static int DoPTEffect7(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffect8(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)tick;
+ (void)flags;
dat = UniGetByte();
if (mod->panflag)
@@ -777,13 +799,16 @@ static int DoPTEffect8(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (!tick) {
if (dat) a->soffset=(UWORD)dat<<8;
a->main.start=a->hioffset|a->soffset;
- if ((a->main.s)&&(a->main.start>a->main.s->length))
+ if ((a->main.s)&&(a->main.start > (SLONG)a->main.s->length))
a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)?
a->main.s->loopstart:a->main.s->length;
}
@@ -794,6 +819,9 @@ static int DoPTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (tick)
@@ -814,6 +842,8 @@ static int DoPTEffect6(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffectB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)a;
+ (void)channel;
dat=UniGetByte();
@@ -848,6 +878,9 @@ static int DoPTEffectB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffectC(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (tick) return 0;
@@ -861,6 +894,8 @@ static int DoPTEffectC(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffectD(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)a;
+ (void)channel;
dat=UniGetByte();
if ((tick)||(mod->patdly2)) return 0;
@@ -1022,6 +1057,9 @@ static int DoPTEffectE(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoPTEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)a;
+ (void)channel;
dat=UniGetByte();
if (tick||mod->patdly2) return 0;
@@ -1041,6 +1079,9 @@ static int DoPTEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoS3MEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE speed;
+ (void)flags;
+ (void)a;
+ (void)channel;
speed = UniGetByte();
@@ -1091,6 +1132,9 @@ static void DoS3MVolSlide(UWORD tick, UWORD flags, MP_CONTROL *a, UBYTE inf)
static int DoS3MEffectD(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)mod;
+ (void)channel;
+
DoS3MVolSlide(tick, flags, a, UniGetByte());
return 1;
@@ -1121,6 +1165,9 @@ static void DoS3MSlideDn(UWORD tick, MP_CONTROL *a, UBYTE inf)
static int DoS3MEffectE(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (a->main.period)
@@ -1152,6 +1199,9 @@ static void DoS3MSlideUp(UWORD tick, MP_CONTROL *a, UBYTE inf)
static int DoS3MEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (a->main.period)
@@ -1163,6 +1213,9 @@ static int DoS3MEffectF(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoS3MEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE inf, on, off;
+ (void)flags;
+ (void)mod;
+ (void)channel;
inf = UniGetByte();
if (inf)
@@ -1189,6 +1242,8 @@ static int DoS3MEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoS3MEffectQ(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE inf;
+ (void)mod;
+ (void)channel;
inf = UniGetByte();
if (a->main.period) {
@@ -1251,6 +1306,9 @@ static int DoS3MEffectR(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
{
UBYTE dat, q;
UWORD temp=0; /* silence warning */
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (!tick) {
@@ -1298,6 +1356,9 @@ static int DoS3MEffectR(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoS3MEffectT(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE tempo;
+ (void)flags;
+ (void)a;
+ (void)channel;
tempo = UniGetByte();
@@ -1313,6 +1374,9 @@ static int DoS3MEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
{
UBYTE dat, q;
UWORD temp = 0; /* silence warning */
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (!tick) {
@@ -1358,6 +1422,10 @@ static int DoS3MEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoKeyOff(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)tick;
+ (void)flags;
+ (void)mod;
+ (void)channel;
a->main.keyoff|=KEY_OFF;
if ((!(a->main.volflg&EF_ON))||(a->main.volflg&EF_LOOP))
a->main.keyoff=KEY_KILL;
@@ -1368,6 +1436,8 @@ static int DoKeyOff(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD c
static int DoKeyFade(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)channel;
dat=UniGetByte();
if ((tick>=dat)||(tick==mod->sngspd-1)) {
@@ -1386,6 +1456,9 @@ static int DoKeyFade(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD
static int DoXMEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE inf, lo, hi;
+ (void)flags;
+ (void)mod;
+ (void)channel;
inf = UniGetByte();
if (inf)
@@ -1411,6 +1484,9 @@ static int DoXMEffectA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoXMEffect6(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)flags;
+ (void)mod;
+ (void)channel;
if (a->main.period)
DoVibrato(tick, a);
@@ -1420,6 +1496,9 @@ static int DoXMEffect6(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoXMEffectE1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (!tick) {
@@ -1434,6 +1513,9 @@ static int DoXMEffectE1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoXMEffectE2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (!tick) {
@@ -1448,6 +1530,9 @@ static int DoXMEffectE2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoXMEffectEA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (!tick)
@@ -1461,6 +1546,9 @@ static int DoXMEffectEA(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoXMEffectEB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if (!tick)
@@ -1473,6 +1561,10 @@ static int DoXMEffectEB(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoXMEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)tick;
+ (void)flags;
+ (void)a;
+ (void)channel;
mod->volume=UniGetByte()<<1;
if (mod->volume>128) mod->volume=128;
@@ -1482,6 +1574,9 @@ static int DoXMEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoXMEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE inf;
+ (void)flags;
+ (void)a;
+ (void)channel;
inf = UniGetByte();
@@ -1503,6 +1598,9 @@ static int DoXMEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoXMEffectL(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat=UniGetByte();
if ((!tick)&&(a->main.i)) {
@@ -1529,6 +1627,8 @@ static int DoXMEffectP(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
{
UBYTE inf, lo, hi;
SWORD pan;
+ (void)flags;
+ (void)channel;
inf = UniGetByte();
if (!mod->panflag)
@@ -1557,6 +1657,9 @@ static int DoXMEffectP(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoXMEffectX1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (dat)
@@ -1577,6 +1680,9 @@ static int DoXMEffectX1(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoXMEffectX2(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat;
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (dat)
@@ -1638,6 +1744,9 @@ static void DoITToneSlide(UWORD tick, MP_CONTROL *a, UBYTE dat)
static int DoITEffectG(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)flags;
+ (void)mod;
+ (void)channel;
DoITToneSlide(tick, a, UniGetByte());
return 0;
@@ -1689,6 +1798,9 @@ static void DoITVibrato(UWORD tick, MP_CONTROL *a, UBYTE dat)
static int DoITEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)flags;
+ (void)mod;
+ (void)channel;
DoITVibrato(tick, a, UniGetByte());
return 0;
@@ -1697,6 +1809,10 @@ static int DoITEffectH(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoITEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE inf, on, off;
+ (void)tick;
+ (void)flags;
+ (void)mod;
+ (void)channel;
inf = UniGetByte();
if (inf)
@@ -1720,6 +1836,10 @@ static int DoITEffectI(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoITEffectM(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)tick;
+ (void)flags;
+ (void)mod;
+ (void)channel;
a->main.chanvol=UniGetByte();
if (a->main.chanvol>64)
a->main.chanvol=64;
@@ -1732,6 +1852,10 @@ static int DoITEffectM(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoITEffectN(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE inf, lo, hi;
+ (void)tick;
+ (void)flags;
+ (void)mod;
+ (void)channel;
inf = UniGetByte();
@@ -1768,6 +1892,9 @@ static int DoITEffectP(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
{
UBYTE inf, lo, hi;
SWORD pan;
+ (void)flags;
+ (void)mod;
+ (void)channel;
inf = UniGetByte();
if (inf)
@@ -1805,6 +1932,10 @@ static int DoITEffectT(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
{
UBYTE tempo;
SWORD temp;
+ (void)tick;
+ (void)flags;
+ (void)a;
+ (void)channel;
tempo = UniGetByte();
@@ -1826,6 +1957,9 @@ static int DoITEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
{
UBYTE dat, q;
UWORD temp = 0; /* silence warning */
+ (void)flags;
+ (void)mod;
+ (void)channel;
dat = UniGetByte();
if (!tick) {
@@ -1870,6 +2004,9 @@ static int DoITEffectU(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
static int DoITEffectW(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE inf, lo, hi;
+ (void)flags;
+ (void)a;
+ (void)channel;
inf = UniGetByte();
@@ -1906,6 +2043,7 @@ static int DoITEffectY(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWOR
{
UBYTE dat, q;
SLONG temp = 0; /* silence warning */
+ (void)flags;
dat=UniGetByte();
@@ -1998,7 +2136,7 @@ static int DoITEffectS0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
a->hioffset=inf<<16;
a->main.start=a->hioffset|a->soffset;
- if ((a->main.s)&&(a->main.start>a->main.s->length))
+ if ((a->main.s)&&(a->main.start > (SLONG)a->main.s->length))
a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)?
a->main.s->loopstart:a->main.s->length;
}
@@ -2030,6 +2168,7 @@ static int DoITEffectS0(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoVolEffects(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE c, inf;
+ (void)channel;
c = UniGetByte();
inf = UniGetByte();
@@ -2080,12 +2219,16 @@ static int DoVolEffects(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoULTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UWORD offset=UniGetWord();
+ (void)tick;
+ (void)flags;
+ (void)mod;
+ (void)channel;
if (offset)
a->ultoffset=offset;
a->main.start=a->ultoffset<<2;
- if ((a->main.s)&&(a->main.start>a->main.s->length))
+ if ((a->main.s)&&(a->main.start > (SLONG)a->main.s->length))
a->main.start=a->main.s->flags&(SF_LOOP|SF_BIDI)?
a->main.s->loopstart:a->main.s->length;
@@ -2097,6 +2240,10 @@ static int DoULTEffect9(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWO
static int DoMEDSpeed(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UWORD speed=UniGetWord();
+ (void)tick;
+ (void)flags;
+ (void)a;
+ (void)channel;
mod->bpm=speed;
@@ -2129,6 +2276,8 @@ static int DoMEDEffectF3(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SW
static int DoOktArp(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
UBYTE dat, dat2;
+ (void)mod;
+ (void)channel;
dat2 = UniGetByte(); /* arpeggio style */
dat = UniGetByte();
@@ -2148,6 +2297,11 @@ static int DoOktArp(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD c
static int DoNothing(UWORD tick, UWORD flags, MP_CONTROL *a, MODULE *mod, SWORD channel)
{
+ (void)tick;
+ (void)flags;
+ (void)a;
+ (void)mod;
+ (void)channel;
UniSkipOpcode();
return 0;
@@ -2330,7 +2484,7 @@ void pt_UpdateVoices(MODULE *mod, int max_volume)
if ((aout->main.kick==KICK_NOTE)||(aout->main.kick==KICK_KEYOFF)) {
Voice_Play_internal(channel,s,(aout->main.start==-1)?
- ((s->flags&SF_UST_LOOP)?s->loopstart:0):aout->main.start);
+ ((s->flags&SF_UST_LOOP) ? (SLONG)s->loopstart : 0) : aout->main.start);
aout->main.fadevol=32768;
aout->aswppos=0;
}
@@ -3242,7 +3396,7 @@ MIKMODAPI void Player_Mute(SLONG arg1,...)
static void Player_ToggleMute_internal(SLONG arg1,va_list ap)
{
SLONG arg2,arg3=0;
- ULONG t;
+ SLONG t;
if (pf) {
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)
if(vc_mode & DMODE_SOFT_MUSIC) md_player();
tickleft=(md_mixfreq*125L)/(md_bpm*50L);
}
- left = MIN(tickleft, todo);
+ left = MIN(tickleft, (int)todo);
buffer = buf;
tickleft -= left;
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)
ULONG VC1_SampleSpace(int type)
{
+ (void)type;
return vc_memory;
}
ULONG VC1_SampleLength(int type,SAMPLE* s)
{
+ (void)type;
if (!s) return 0;
return (s->length*((s->flags&SF_16BITS)?2:1))+16;