ref: 1dc9e6722254bd508e4759853228b638f8e43d52
parent: 2fd0e3c541c991a83f21380c9c2a0e969d50fe69
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Aug 23 14:12:31 EDT 2023
fix warnings
--- a/src/pt2_audio.c
+++ b/src/pt2_audio.c
@@ -383,7 +383,7 @@
samplesLeft -= samplesToMix;
}
- (void)userdata;
+ USED(userdata);
}
void audioSetStereoSeparation(uint8_t percentage) // 0..100 (percentage)
--- a/src/pt2_diskop.c
+++ b/src/pt2_diskop.c
@@ -667,7 +667,7 @@
static int32_t SDLCALL diskOpFillThreadFunc(void *ptr)
{
- (void)ptr;
+ USED(ptr);
diskop.isFilling = true;
diskOpFillBuffer();
--- a/src/pt2_mod2wav.c
+++ b/src/pt2_mod2wav.c
@@ -404,6 +404,7 @@
if (--numLoops < 0) \
{ \
calcingRows = false; \
+ USED(calcingRows); \
break; \
} \
else \
--- a/src/pt2_module_loader.c
+++ b/src/pt2_module_loader.c
@@ -38,7 +38,7 @@
uint32_t powerPackerID;
uint8_t *modBuffer = NULL;
- module_t *newMod = NULL;
+ module_t *newMod;
FILE *f = UNICHAR_FOPEN(fileName, "rb");
if (f == NULL)
--- a/src/pt2_sampling.c
+++ b/src/pt2_sampling.c
@@ -204,6 +204,7 @@
static void SDLCALL samplingCallback(void *userdata, Uint8 *stream, int len)
{
callbackBusy = true;
+ USED(callbackBusy);
if (!displayingBuffer)
{
@@ -270,7 +271,7 @@
}
callbackBusy = false;
- (void)userdata;
+ USED(userdata);
}
static void stopInputAudio(void)
--- a/src/pt2_scopes.c
+++ b/src/pt2_scopes.c
@@ -126,6 +126,8 @@
volatile scope_t *sc = scope;
scopesUpdatingFlag = true;
+ USED(scopesUpdatingFlag);
+
for (int32_t i = 0; i < PAULA_VOICES; i++, sc++)
{
tempState = *sc; // cache it
@@ -302,7 +304,7 @@
hpc_Wait(&scopeHpc);
}
- (void)ptr;
+ USED(ptr);
return true;
}
--- a/src/pt2_visuals_sync.c
+++ b/src/pt2_visuals_sync.c
@@ -190,6 +190,7 @@
else if (chSync.writePos < chSync.readPos)
{
chQueueClearing = true;
+ USED(chQueueClearing);
/* Buffer is full, reset the read/write pos. This is actually really nasty since
** read/write are two different threads, but because of timestamp validation it
--- a/src/smploaders/pt2_load_aiff.c
+++ b/src/smploaders/pt2_load_aiff.c
@@ -115,7 +115,7 @@
if (commLen > 18)
{
char compType[4];
- fread(&compType, 1, 4, f);
+ fread(compType, 1, 4, f);
if (memcmp(compType, "NONE", 4))
{
displayErrorMsg("UNSUPPORTED AIFF!");
--- a/src/smploaders/pt2_load_flac.c
+++ b/src/smploaders/pt2_load_flac.c
@@ -524,12 +524,9 @@
bool loadFLACSample(FILE *f, uint32_t filesize, moduleSample_t *s)
{
+ USED(f); USED(filesize); USED(s);
displayErrorMsg("NO FLAC SUPPORT !");
return false;
-
- (void)f;
- (void)filesize;
- (void)s;
}
#endif
--- a/src/smploaders/pt2_load_iff.c
+++ b/src/smploaders/pt2_load_iff.c
@@ -29,7 +29,7 @@
fread(tmpCharBuf, 1, 4, f);
bool is16Bit = !strncmp(tmpCharBuf, "16SV", 4);
- int32_t sampleLength = 0;
+ int32_t sampleLength;
uint32_t sampleVolume = 65536; // max volume
fseek(f, 12, SEEK_SET);