Removed all unused variable/parameter warnings
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@848 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -272,6 +272,7 @@ CombatIsInevitable (RESPONSE_REF R)
|
||||
static void
|
||||
Frenzy (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
switch (GET_GAME_STATE (KOHR_AH_REASONS))
|
||||
{
|
||||
case 0:
|
||||
@@ -367,6 +368,7 @@ KohrAhStory (RESPONSE_REF R)
|
||||
static void
|
||||
DieHuman (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
switch (GET_GAME_STATE (KOHR_AH_REASONS))
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -441,6 +441,7 @@ static void RevealSelf (RESPONSE_REF R);
|
||||
static void
|
||||
TellProbe (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
NPCPhrase (THAT_WAS_PROBE);
|
||||
DISABLE_PHRASE (what_was_red_thing);
|
||||
|
||||
|
||||
@@ -532,6 +532,7 @@ DoRescue (RESPONSE_REF R)
|
||||
SIZE dx, dy;
|
||||
COUNT fuel_required;
|
||||
|
||||
(void) R; // ignored
|
||||
dx = LOGX_TO_UNIVERSE (GLOBAL_SIS (log_x))
|
||||
- SOL_X;
|
||||
dy = LOGY_TO_UNIVERSE (GLOBAL_SIS (log_y))
|
||||
@@ -1771,6 +1772,7 @@ DoMelnormeHate (RESPONSE_REF R)
|
||||
{
|
||||
BYTE hate_count;
|
||||
|
||||
(void) R; // ignored
|
||||
hate_count = GET_GAME_STATE (MELNORME_HATE_COUNT);
|
||||
switch (hate_count++)
|
||||
{
|
||||
|
||||
@@ -407,6 +407,7 @@ static void OrzNeutral (RESPONSE_REF R);
|
||||
static void
|
||||
WhereAndrosyn (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
NPCPhrase (DISEMBLE_ABOUT_ANDROSYN);
|
||||
DISABLE_PHRASE (where_androsyn);
|
||||
|
||||
|
||||
@@ -86,14 +86,9 @@ ShipsReady (void)
|
||||
SIZE i;
|
||||
|
||||
return (GET_GAME_STATE (PKUNK_MANNER) == 3
|
||||
&& !((i = (GLOBAL (GameClock.year_index) - START_YEAR)
|
||||
- GET_GAME_STATE (PKUNK_SHIP_YEAR)) < 0
|
||||
|| (i == 0
|
||||
&& (i = GLOBAL (GameClock.month_index) -
|
||||
GET_GAME_STATE (PKUNK_SHIP_MONTH)) < 0
|
||||
|| (i == 0
|
||||
&& GLOBAL (GameClock.day_index) <
|
||||
GET_GAME_STATE (PKUNK_SHIP_DAY)))));
|
||||
&& !((i = (GLOBAL (GameClock.year_index) - START_YEAR) - GET_GAME_STATE (PKUNK_SHIP_YEAR)) < 0
|
||||
|| ((i == 0 && (i = GLOBAL (GameClock.month_index) - GET_GAME_STATE (PKUNK_SHIP_MONTH)) < 0)
|
||||
|| (i == 0 && GLOBAL (GameClock.day_index) < GET_GAME_STATE (PKUNK_SHIP_DAY)))));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -815,6 +810,7 @@ static void
|
||||
PkunkMigrate (RESPONSE_REF R)
|
||||
{
|
||||
BYTE ReasonMask;
|
||||
(void) R; // ignored
|
||||
|
||||
ReasonMask = GET_GAME_STATE (PKUNK_REASONS);
|
||||
if (!(ReasonMask & GOOD_REASON_1))
|
||||
|
||||
@@ -301,14 +301,9 @@ Rebels (RESPONSE_REF R)
|
||||
else if (PLAYER_SAID (R, any_ships))
|
||||
{
|
||||
if (GET_GAME_STATE (YEHAT_SHIP_MONTH)
|
||||
&& ((NumVisits = (GLOBAL (GameClock.year_index) - START_YEAR)
|
||||
- GET_GAME_STATE (YEHAT_SHIP_YEAR)) < 0
|
||||
|| (NumVisits == 0
|
||||
&& (NumVisits = GLOBAL (GameClock.month_index) -
|
||||
GET_GAME_STATE (YEHAT_SHIP_MONTH)) < 0
|
||||
|| (NumVisits == 0
|
||||
&& GLOBAL (GameClock.day_index) <
|
||||
GET_GAME_STATE (YEHAT_SHIP_DAY)))))
|
||||
&& ((NumVisits = (GLOBAL (GameClock.year_index) - START_YEAR) - GET_GAME_STATE (YEHAT_SHIP_YEAR)) < 0
|
||||
|| ((NumVisits == 0 && (NumVisits = GLOBAL (GameClock.month_index) - GET_GAME_STATE (YEHAT_SHIP_MONTH)) < 0)
|
||||
|| (NumVisits == 0 && GLOBAL (GameClock.day_index) < GET_GAME_STATE (YEHAT_SHIP_DAY)))))
|
||||
NPCPhrase (NO_SHIPS_YET);
|
||||
else if ((NumVisits = ActivateStarShip (YEHAT_SHIP, FEASIBILITY_STUDY)) == 0)
|
||||
NPCPhrase (NO_ROOM);
|
||||
|
||||
@@ -318,6 +318,7 @@ ExplainDefeat (RESPONSE_REF R)
|
||||
static void
|
||||
RealizeMistake (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
NPCPhrase (DGRUNTI);
|
||||
SET_GAME_STATE (SHOFIXTI_STACK1, 0);
|
||||
SET_GAME_STATE (SHOFIXTI_STACK3, 0);
|
||||
@@ -347,6 +348,7 @@ RealizeMistake (RESPONSE_REF R)
|
||||
static void
|
||||
Hostile (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
switch (GET_GAME_STATE (SHOFIXTI_STACK1))
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -154,6 +154,7 @@ static LOCDATA slylandro_desc =
|
||||
static void
|
||||
ExitConversation (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
SET_GAME_STATE (BATTLE_SEGUE, 0);
|
||||
|
||||
switch (GET_GAME_STATE (SLYLANDRO_HOME_VISITS))
|
||||
|
||||
@@ -140,6 +140,7 @@ ByeBye (RESPONSE_REF R)
|
||||
{
|
||||
BYTE b0, b1, b2, b3;
|
||||
|
||||
(void) R; // ignored
|
||||
b0 = GET_GAME_STATE (STARBASE_BULLETS0);
|
||||
b1 = GET_GAME_STATE (STARBASE_BULLETS1);
|
||||
b2 = GET_GAME_STATE (STARBASE_BULLETS2);
|
||||
@@ -1741,7 +1742,7 @@ SellMinerals (RESPONSE_REF R)
|
||||
TimeIn = GetTimeCounter ();
|
||||
}
|
||||
|
||||
if (amount = GLOBAL_SIS (ElementAmounts[i]))
|
||||
if ((amount = GLOBAL_SIS (ElementAmounts[i])) != 0)
|
||||
{
|
||||
total += amount * GLOBAL (ElementWorth[i]);
|
||||
do
|
||||
|
||||
@@ -667,6 +667,7 @@ InitialSyreen (RESPONSE_REF R)
|
||||
static void
|
||||
PlanAmbush (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
NPCPhrase (OK_FOUND_VAULT);
|
||||
|
||||
SET_GAME_STATE (MYCON_AMBUSH, 1);
|
||||
|
||||
@@ -475,6 +475,7 @@ ThraddCulture (RESPONSE_REF R)
|
||||
static void
|
||||
ThraddWorship (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
SET_GAME_STATE (THRADD_VISITS, 0);
|
||||
SET_GAME_STATE (THRADD_MANNER, 1);
|
||||
SET_GAME_STATE (THRADD_STACK_1, 0);
|
||||
|
||||
@@ -227,6 +227,7 @@ ExitConversation (RESPONSE_REF R)
|
||||
static void
|
||||
FormAlliance (RESPONSE_REF R)
|
||||
{
|
||||
(void) R; // ignored
|
||||
NPCPhrase_cb (ALLY_WITH_US0, &SelectAlienZOQ);
|
||||
NPCPhrase_cb (ALLY_WITH_US1, &SelectAlienPIK);
|
||||
NPCPhrase_cb (ALLY_WITH_US2, &SelectAlienZOQ);
|
||||
|
||||
@@ -135,7 +135,6 @@ InitSIS (void)
|
||||
{
|
||||
HSTARSHIP hMasterShip;
|
||||
STARSHIPPTR MasterShipPtr;
|
||||
extern QUEUE master_q;
|
||||
|
||||
hMasterShip = FindMasterShip (ship_ref);
|
||||
MasterShipPtr = LockStarShip (&master_q, hMasterShip);
|
||||
|
||||
@@ -295,6 +295,7 @@ void rZF_nearestneighbor (SDL_Surface *src, SDL_Surface *dst, int use_weight)
|
||||
for (y = 0; y < dst->h; y++)
|
||||
{
|
||||
if (y)
|
||||
{
|
||||
if (!(y & 0x03))
|
||||
{
|
||||
yptr += src->w;
|
||||
@@ -305,6 +306,7 @@ void rZF_nearestneighbor (SDL_Surface *src, SDL_Surface *dst, int use_weight)
|
||||
}
|
||||
else if (use_weight)
|
||||
pry += 12;
|
||||
}
|
||||
for (x = 0; x < dst->w; x++)
|
||||
{
|
||||
Uint32 p;
|
||||
@@ -421,7 +423,7 @@ void rZF_continuous (SDL_Surface *src, SDL_Surface *dst)
|
||||
int fromx, fromx4;
|
||||
int dy1;
|
||||
Uint32 p00;
|
||||
char cpl[3][3] = {0,0,0,0,0,0,0,0,0};
|
||||
char cpl[3][3] = {{0,0,0},{0,0,0},{0,0,0}};
|
||||
if (x == src->w)
|
||||
fromx = 0;
|
||||
else
|
||||
|
||||
@@ -404,6 +404,7 @@ SWORD VC1_SampleLoad(struct SAMPLOAD* sload,int type)
|
||||
|
||||
ULONG VC1_SampleSpace(int type)
|
||||
{
|
||||
(void) type; // ignored
|
||||
return vc_memory;
|
||||
}
|
||||
|
||||
@@ -411,6 +412,8 @@ ULONG VC1_SampleLength(int type,SAMPLE* s)
|
||||
{
|
||||
if (!s) return 0;
|
||||
|
||||
(void) type; // ignored
|
||||
|
||||
return (s->length*((s->flags&SF_16BITS)?2:1))+16;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,12 +37,18 @@ PlayChannel (COUNT channel, PVOID sample, COUNT sample_length, COUNT loop_begin,
|
||||
TFBSound_Sourcei (soundSource[channel].handle, TFBSOUND_BUFFER,
|
||||
tfb_sample->buffer[0]);
|
||||
TFBSound_SourcePlay (soundSource[channel].handle);
|
||||
/* ignored arguments */
|
||||
(void)sample_length;
|
||||
(void)loop_begin;
|
||||
(void)loop_length;
|
||||
(void)priority;
|
||||
}
|
||||
|
||||
void
|
||||
StopChannel (COUNT channel, unsigned char Priority)
|
||||
{
|
||||
StopSource (channel);
|
||||
(void)Priority; // ignored
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -84,6 +90,7 @@ SetChannelVolume (COUNT channel, COUNT volume, BYTE priority)
|
||||
{
|
||||
TFBSound_Sourcef (soundSource[channel].handle, TFBSOUND_GAIN,
|
||||
(volume / (float)MAX_VOLUME) * sfxVolumeScale);
|
||||
(void)priority; // ignored
|
||||
}
|
||||
|
||||
// Status: Ignored
|
||||
@@ -98,6 +105,7 @@ GetSampleAddress (SOUND sound)
|
||||
COUNT
|
||||
GetSampleLength (SOUND sound)
|
||||
{
|
||||
(void)sound;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -105,12 +113,16 @@ GetSampleLength (SOUND sound)
|
||||
void
|
||||
SetChannelRate (COUNT channel, DWORD rate_hz, unsigned char priority)
|
||||
{
|
||||
(void) channel;
|
||||
(void) rate_hz;
|
||||
(void) priority;
|
||||
}
|
||||
|
||||
// Status: Ignored
|
||||
COUNT
|
||||
GetSampleRate (SOUND sound)
|
||||
{
|
||||
(void) sound;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -127,6 +139,7 @@ _GetSoundBankData (FILE *fp, DWORD length)
|
||||
TFB_SoundSample *sndfx[MAX_FX];
|
||||
STRING_TABLE Snd;
|
||||
|
||||
(void) length; // ignored
|
||||
opos = ftell (fp);
|
||||
|
||||
{
|
||||
|
||||
@@ -162,6 +162,9 @@ get_previous_chain (TFB_SoundChain *first_chain, TFB_SoundChain *current_chain)
|
||||
BOOLEAN
|
||||
InitSound (int argc, char* argv[])
|
||||
{
|
||||
/* Quell compiler warnings */
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -271,9 +271,6 @@ _GetStringData (FILE *fp, DWORD length)
|
||||
|
||||
lpStringOffs = lpST->StringOffsets;
|
||||
lpClipOffs = &lpST->StringOffsets[lpST->StringCount + 1];
|
||||
{
|
||||
long foo = (lpST->StringCount + 1) << ((lpST->flags & HAS_SOUND_CLIPS) ? 1 : 0);
|
||||
}
|
||||
lpTSOffs = &lpST->StringOffsets[(lpST->StringCount + 1)
|
||||
<< ((lpST->flags & HAS_SOUND_CLIPS) ? 1 : 0)];
|
||||
for (n = 0; n < (int)lpST->StringCount;
|
||||
|
||||
@@ -553,6 +553,7 @@ ClearSemaphore (Semaphore sem)
|
||||
sem_name = SemMon[i].Name;
|
||||
if (SemMon[i].Thread && SemMon[i].Thread != NativeThreadID ())
|
||||
#if defined (THREAD_QUEUE) && defined (THREAD_NAMES)
|
||||
{
|
||||
if (ThreadNameNative (SemMon[i].Thread) == NULL)
|
||||
fprintf( stderr, "Freeing %s Semaphore in '%s' set by defunct thread '%s'!\n",
|
||||
sem_name,
|
||||
@@ -563,6 +564,7 @@ ClearSemaphore (Semaphore sem)
|
||||
sem_name,
|
||||
ThreadNameNative (NativeThreadID ()),
|
||||
ThreadNameNative (SemMon[i].Thread));
|
||||
}
|
||||
SemMon[i].ThreadName[0] = 0;
|
||||
#else
|
||||
fprintf (stderr, "Freeing %s Semaphore that was set by a different thread\n",
|
||||
|
||||
@@ -40,6 +40,9 @@ InitOscilloscope (DWORD x, DWORD y, DWORD width, DWORD height, FRAME_DESC *f)
|
||||
TFB_DrawImage_Image (f->image, 0, 0, 0, NULL, scope_bg);
|
||||
scope_init = 1;
|
||||
}
|
||||
/* remove compiler warnings */
|
||||
(void) x;
|
||||
(void) y;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -61,8 +61,9 @@ RotatePlanet (int x, int da, int dx, int dy, int zoom)
|
||||
RECT r, *rp = NULL;
|
||||
CONTEXT OldContext;
|
||||
|
||||
(void)da; // ignored
|
||||
|
||||
// If thiis frame hasn' been generted, generate it
|
||||
// If this frame hasn't been generted, generate it
|
||||
if (! pSolarSysState->isPFADefined[x]) {
|
||||
RenderLevelMasks (x);
|
||||
pSolarSysState->isPFADefined[x] = 1;
|
||||
|
||||
@@ -110,7 +110,6 @@ PrintCoarseScanPC (void)
|
||||
SIZE temp;
|
||||
TEXT t;
|
||||
RECT r;
|
||||
STAMP s;
|
||||
UNICODE buf[40];
|
||||
|
||||
SetSemaphore (GraphicsSem);
|
||||
|
||||
Reference in New Issue
Block a user