shithub: pt2-clone

Download patch

ref: 2eb8e28242637554fded93938e62f873ffb2631e
parent: 43b257e43bcf623c69e0c38e5e13ee1a2011cf84
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Dec 19 10:28:35 EST 2022

Fix GCC compiler warnings

--- a/src/pt2_audio.h
+++ b/src/pt2_audio.h
@@ -30,7 +30,6 @@
 void toggleLEDFilter(void);
 
 void updateReplayerTimingMode(void);
-void setSyncTickTimeLen(uint32_t timeLen, uint32_t timeLenFrac);
 void resetAudioDithering(void);
 void generateBpmTable(double dAudioFreq, bool vblankTimingFlag);
 uint16_t get16BitPeak(int16_t *sampleData, uint32_t sampleLength);
--- a/src/pt2_mod2wav.c
+++ b/src/pt2_mod2wav.c
@@ -100,7 +100,7 @@
 
 static void showMod2WavProgress(void)
 {
-	char percText[8];
+	char percText[16];
 
 	if (song->rowsInTotal == 0)
 		return;
--- a/src/pt2_module_loader.c
+++ b/src/pt2_module_loader.c
@@ -451,7 +451,7 @@
 		{
 			for (int32_t k = 0; k < numChannels; k++, note++)
 			{
-				uint8_t bytes[4];
+				uint8_t bytes[4] = { 0 };
 				mread(bytes, 1, 4, m);
 
 				note->period = ((bytes[0] & 0x0F) << 8) | bytes[1];
--- a/src/pt2_pat2smp.h
+++ b/src/pt2_pat2smp.h
@@ -5,7 +5,6 @@
 void pat2SmpDrawNote(void);
 void pat2SmpDrawFinetune(void);
 void pat2SmpDrawFrequency(void);
-void pat2SmpDrawFinetune(void);
 void pat2SmpDrawStartRow(void);
 void pat2SmpDrawRows(void);
 void pat2SmpCalculateFreq(void);
--- a/src/pt2_paula.c
+++ b/src/pt2_paula.c
@@ -327,7 +327,7 @@
 	}
 }
 
-void paulaWritePtr(uint32_t address, const void *ptr)
+void paulaWritePtr(uint32_t address, const int8_t *ptr)
 {
 	if (address == 0)
 		return;
--- a/src/pt2_paula.h
+++ b/src/pt2_paula.h
@@ -24,7 +24,7 @@
 
 void paulaWriteByte(uint32_t address, uint16_t data8);
 void paulaWriteWord(uint32_t address, uint16_t data16);
-void paulaWritePtr(uint32_t address, const void *ptr);
+void paulaWritePtr(uint32_t address, const int8_t *ptr);
 
 // output is -4.00 .. 3.97 (can be louder because of high-pass filter)
 void paulaGenerateSamples(double *dOutL, double *dOutR, int32_t numSamples);