Fixe unused variable warnings

This commit is contained in:
Aaron Culliney
2014-06-14 11:50:50 -07:00
parent 595bab04bd
commit 1649419b39
8 changed files with 16 additions and 28 deletions

View File

@@ -197,7 +197,7 @@ static bool g_bMB_RegAccessedFlag = false;
static bool g_bMB_Active = false; static bool g_bMB_Active = false;
#ifdef APPLE2IX #ifdef APPLE2IX
static pthread_t mockingboard_thread = (pthread_t)-1; //static pthread_t mockingboard_thread = (pthread_t)-1;
static pthread_t g_hThread = 0; static pthread_t g_hThread = 0;
#else #else
static HANDLE g_hThread = NULL; static HANDLE g_hThread = NULL;
@@ -253,8 +253,8 @@ static pthread_mutex_t mockingboard_mutex = PTHREAD_MUTEX_INITIALIZER;
static uint8_t quit_event = false; static uint8_t quit_event = false;
#else #else
static HANDLE g_hSSI263Event[g_nNumEvents] = {NULL}; // 1: Phoneme finished playing, 2: Exit thread static HANDLE g_hSSI263Event[g_nNumEvents] = {NULL}; // 1: Phoneme finished playing, 2: Exit thread
#endif
static DWORD g_dwMaxPhonemeLen = 0; static DWORD g_dwMaxPhonemeLen = 0;
#endif
// When 6522 IRQ is *not* active use 60Hz update freq for MB voices // When 6522 IRQ is *not* active use 60Hz update freq for MB voices
static const double g_f6522TimerPeriod_NoIRQ = CLK_6502 / 60.0; // Constant whatever the CLK is set to static const double g_f6522TimerPeriod_NoIRQ = CLK_6502 / 60.0; // Constant whatever the CLK is set to
@@ -817,7 +817,6 @@ static void Votrax_Write(BYTE nDevice, BYTE nValue)
static void MB_Update() static void MB_Update()
{ {
char szDbg[200];
#ifdef APPLE2IX #ifdef APPLE2IX
static int nNumSamplesError = 0; static int nNumSamplesError = 0;
if (!MockingboardVoice.bActive || !g_bMB_Active) if (!MockingboardVoice.bActive || !g_bMB_Active)
@@ -826,6 +825,7 @@ static void MB_Update()
return; return;
} }
#else #else
char szDbg[200];
if (!MockingboardVoice.bActive) if (!MockingboardVoice.bActive)
return; return;
#endif #endif
@@ -2059,14 +2059,18 @@ void MB_UpdateCycles(ULONG uExecutedCycles)
SY6522_AY8910* pMB = &g_MB[i]; SY6522_AY8910* pMB = &g_MB[i];
USHORT OldTimer1 = pMB->sy6522.TIMER1_COUNTER.w; USHORT OldTimer1 = pMB->sy6522.TIMER1_COUNTER.w;
#ifndef APPLE2IX
USHORT OldTimer2 = pMB->sy6522.TIMER2_COUNTER.w; USHORT OldTimer2 = pMB->sy6522.TIMER2_COUNTER.w;
#endif
pMB->sy6522.TIMER1_COUNTER.w -= nClocks; pMB->sy6522.TIMER1_COUNTER.w -= nClocks;
pMB->sy6522.TIMER2_COUNTER.w -= nClocks; pMB->sy6522.TIMER2_COUNTER.w -= nClocks;
// Check for counter underflow // Check for counter underflow
bool bTimer1Underflow = (!(OldTimer1 & 0x8000) && (pMB->sy6522.TIMER1_COUNTER.w & 0x8000)); bool bTimer1Underflow = (!(OldTimer1 & 0x8000) && (pMB->sy6522.TIMER1_COUNTER.w & 0x8000));
#ifndef APPLE2IX
bool bTimer2Underflow = (!(OldTimer2 & 0x8000) && (pMB->sy6522.TIMER2_COUNTER.w & 0x8000)); bool bTimer2Underflow = (!(OldTimer2 & 0x8000) && (pMB->sy6522.TIMER2_COUNTER.w & 0x8000));
#endif
if( bTimer1Underflow && (g_nMBTimerDevice == i) && g_bMBTimerIrqActive ) if( bTimer1Underflow && (g_nMBTimerDevice == i) && g_bMBTimerIrqActive )
{ {

View File

@@ -115,7 +115,6 @@ long SoundSystemCreate(const char *sound_device, SoundSystemStruct **sound_struc
assert(*sound_struct == NULL); assert(*sound_struct == NULL);
assert(voices == NULL); assert(voices == NULL);
int err = -1;
ALCcontext *ctx = NULL; ALCcontext *ctx = NULL;
do { do {
@@ -763,7 +762,6 @@ static long OpenALCreateSoundBuffer(ALBufferParamsStruct *params, ALSoundBufferS
assert(ctx != NULL); assert(ctx != NULL);
ALVoice *voice = NULL; ALVoice *voice = NULL;
int err = -1;
do { do {

View File

@@ -386,8 +386,10 @@ bool DSZeroVoiceWritableBuffer(PVOICE Voice, char* pszDevName, DWORD dwBufferSiz
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static bool g_bTimerActive = false; static bool g_bTimerActive = false;
#ifndef APPLE2IX
static eFADE g_FadeType = FADE_NONE; static eFADE g_FadeType = FADE_NONE;
static UINT_PTR g_nTimerID = 0; static UINT_PTR g_nTimerID = 0;
#endif
//------------------------------------- //-------------------------------------
@@ -745,13 +747,13 @@ void SoundCore_SetErrorMax(const int nErrorMax)
//============================================================================= //=============================================================================
static DWORD g_dwAdviseToken;
#ifndef APPLE2IX #ifndef APPLE2IX
static DWORD g_dwAdviseToken;
static IReferenceClock *g_pRefClock = NULL; static IReferenceClock *g_pRefClock = NULL;
static HANDLE g_hSemaphore = NULL; static HANDLE g_hSemaphore = NULL;
#endif
static bool g_bRefClockTimerActive = false; static bool g_bRefClockTimerActive = false;
static DWORD g_dwLastUsecPeriod = 0; static DWORD g_dwLastUsecPeriod = 0;
#endif
bool SysClk_InitTimer() bool SysClk_InitTimer()

View File

@@ -100,8 +100,8 @@ double g_fClksPerSpkrSample; // Setup in SetClksPerSpkrSample()
// Globals // Globals
#ifndef APPLE2IX #ifndef APPLE2IX
static DWORD lastcyclenum = 0; static DWORD lastcyclenum = 0;
#endif
static DWORD toggles = 0; static DWORD toggles = 0;
#endif
static unsigned __int64 g_nSpkrQuietCycleCount = 0; static unsigned __int64 g_nSpkrQuietCycleCount = 0;
static unsigned __int64 g_nSpkrLastCycle = 0; static unsigned __int64 g_nSpkrLastCycle = 0;
static bool g_bSpkrToggleFlag = false; static bool g_bSpkrToggleFlag = false;
@@ -109,9 +109,9 @@ static VOICE SpeakerVoice = {0};
static bool g_bSpkrAvailable = false; static bool g_bSpkrAvailable = false;
#ifndef APPLE2IX
// Globals (SOUND_DIRECT/SOUND_SMART) // Globals (SOUND_DIRECT/SOUND_SMART)
static BOOL directio = 0; static BOOL directio = 0;
#ifndef APPLE2IX
static DWORD lastdelta[2] = {0,0}; static DWORD lastdelta[2] = {0,0};
static DWORD quietcycles = 0; static DWORD quietcycles = 0;
static DWORD soundeffect = 0; static DWORD soundeffect = 0;
@@ -763,6 +763,7 @@ void SpkrUpdate(DWORD totalcycles)
#endif #endif
} }
#ifndef APPLE2IX
// Called from SoundCore_TimerFunc() for FADE_OUT // Called from SoundCore_TimerFunc() for FADE_OUT
void SpkrUpdate_Timer() void SpkrUpdate_Timer()
{ {
@@ -781,7 +782,6 @@ void SpkrUpdate_Timer()
//============================================================================= //=============================================================================
#ifndef APPLE2IX
static DWORD dwByteOffset = (DWORD)-1; static DWORD dwByteOffset = (DWORD)-1;
#endif #endif
static int nNumSamplesError = 0; static int nNumSamplesError = 0;
@@ -991,7 +991,9 @@ static ULONG Spkr_SubmitWaveBuffer_FullSpeed(short* pSpeakerBuffer, ULONG nNumSa
static ULONG Spkr_SubmitWaveBuffer(short* pSpeakerBuffer, ULONG nNumSamples) static ULONG Spkr_SubmitWaveBuffer(short* pSpeakerBuffer, ULONG nNumSamples)
{ {
#ifndef APPLE2IX
char szDbg[200]; char szDbg[200];
#endif
nDbgSpkrCnt++; nDbgSpkrCnt++;
if(!SpeakerVoice.bActive) if(!SpeakerVoice.bActive)

View File

@@ -782,8 +782,6 @@ static inline void _calculate_interp_color(uint8_t *color_buf, const unsigned in
// PlotPixelsExtra // PlotPixelsExtra
static inline void _plot_hires_pixels(uint8_t *dst, const uint8_t *src) { static inline void _plot_hires_pixels(uint8_t *dst, const uint8_t *src) {
uint8_t pix;
for (unsigned int i=2; i; i--) { for (unsigned int i=2; i; i--) {
for (unsigned int j=DYNAMIC_SZ-1; j; j--) { for (unsigned int j=DYNAMIC_SZ-1; j; j--) {
uint16_t pix = *src; uint16_t pix = *src;

View File

@@ -362,7 +362,6 @@ void c_interface_select_diskette( int drive )
struct dirent **namelist; struct dirent **namelist;
bool nextdir = false; bool nextdir = false;
int i, entries; int i, entries;
pid_t pid;
static int curpos=0; static int curpos=0;
int ch = -1; int ch = -1;
@@ -712,7 +711,6 @@ void c_interface_parameters()
int ch; int ch;
static interface_enum_t option = OPT_CPU; static interface_enum_t option = OPT_CPU;
static int cur_y = 0, cur_off = 0, cur_x = 0, cur_pos = 0; static int cur_y = 0, cur_off = 0, cur_x = 0, cur_pos = 0;
int current_mode = apple_mode;
/* reset the x position, so we don't lose our cursor if path changes */ /* reset the x position, so we don't lose our cursor if path changes */
cur_x = 0; cur_x = 0;
@@ -1120,15 +1118,6 @@ void c_interface_parameters()
{ {
timing_initialize(); timing_initialize();
video_set(0); /* redo colors */ video_set(0); /* redo colors */
#if 0
/* reboot machine if different */
if (current_mode != apple_mode)
{
// FIXME : broken ...
cpu65_interrupt(RebootSig);
}
#endif
c_initialize_sound_hooks(); c_initialize_sound_hooks();
c_interface_exit(ch); c_interface_exit(ch);
return; return;
@@ -1493,8 +1482,6 @@ void c_interface_keyboard_layout()
"| (Press any key to exit) |", "| (Press any key to exit) |",
"||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" }; "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" };
int i;
video_setpage( 0 ); video_setpage( 0 );
screen[ 6 ][ 68 ] = MOUSETEXT_BEGIN + 0x0b; screen[ 6 ][ 68 ] = MOUSETEXT_BEGIN + 0x0b;

View File

@@ -293,7 +293,6 @@ static void c_calibrate_pc_joystick()
"| ESC quits calibration |", "| ESC quits calibration |",
"||||||||||||||||||||||||||||||||||||||||" }; "||||||||||||||||||||||||||||||||||||||||" };
uint8_t x_val=0, y_val=0;
uint8_t x_last=CALIBRATE_JOYMENU_W>>1, y_last=CALIBRATE_JOYMENU_H>>1; uint8_t x_last=CALIBRATE_JOYMENU_W>>1, y_last=CALIBRATE_JOYMENU_H>>1;
const char* const spinney = "|/-\\"; const char* const spinney = "|/-\\";
uint8_t spinney_idx=0; uint8_t spinney_idx=0;

View File

@@ -580,8 +580,6 @@ void c_initialize_vm() {
void reinitialize(void) void reinitialize(void)
{ {
int i;
c_initialize_vm(); c_initialize_vm();
softswitches = SS_TEXT | SS_IOUDIS | SS_C3ROM | SS_LCWRT | SS_LCSEC; softswitches = SS_TEXT | SS_IOUDIS | SS_C3ROM | SS_LCWRT | SS_LCSEC;