Fixed a few warnings.

This commit is contained in:
Steven Fuller 2008-05-18 21:56:24 -07:00 committed by Patryk Obara
parent c948a59391
commit a176617318
6 changed files with 15 additions and 14 deletions

View file

@ -447,7 +447,7 @@ void PredPistol_SemiAuto(void) {
void SetPlayerStartingHealth(int value) {
NPC_DATA *NpcData;
NPC_DATA *NpcData = NULL;
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
switch (AvP.PlayerType)
@ -509,7 +509,7 @@ void SetPlayerStartingHealth(int value) {
void SetPlayerStartingArmour(int value) {
NPC_DATA *NpcData;
NPC_DATA *NpcData = NULL;
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
switch (AvP.PlayerType)

View file

@ -896,7 +896,7 @@ extern void DoStatisticsScreen(int completed_level)
int targets,targetspassed;
NPC_DATA *NpcData;
NPC_DATA *NpcData = NULL;
switch (AvP.PlayerType)
{

View file

@ -887,11 +887,10 @@ static int DoMotionTrackerBlips(void)
static void DisplayHealthAndArmour(void)
{
// extern void D3D_RenderHUDString(char *stringPtr,int x,int y,int colour);
int health,armour;
/* access the extra data hanging off the strategy block */
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
NPC_DATA *NpcData;
NPC_DATA *NpcData = NULL;
switch (AvP.PlayerType)
{

View file

@ -718,8 +718,8 @@ static int EmergencyRelocateObject(STRATEGYBLOCK *sbPtr)
nearest invisible module that has entry point locations, and relocate to one of
these locations. */
{
extern SCENE Global_Scene;
extern SCENEMODULE **Global_ModulePtr;
//extern SCENE Global_Scene;
//extern SCENEMODULE **Global_ModulePtr;
AIMODULE *targetModule = 0;
int targetModuleDistance = 0;

View file

@ -191,10 +191,10 @@ void FindVisibleModules(VMODULE *vptr,int flag)
{
while(vptr->vmod_type != vmtype_term)
{
MODULE *mptr;
MODULE *mptr = NULL;
/* Add this module to the visible array */
if(vptr->vmod_mref.mref_ptr)
if(vptr->vmod_mref.mref_ptr != NULL)
{
mptr = vptr->vmod_mref.mref_ptr;
ModuleCurrVisArray[mptr->m_index] = flag;
@ -211,7 +211,7 @@ void FindVisibleModules(VMODULE *vptr,int flag)
/* If the door/viewport is closed... */
/* Branch to this vptr */
/* else vptr++; */
if(mptr)
if(mptr != NULL)
{
if(mptr->m_flags & m_flag_open) vptr++;
else vptr = vptr->vmod_data.vmodidata_ptr;
@ -239,10 +239,10 @@ int ThisObjectIsInAModuleVisibleFromCurrentlyVisibleModules(STRATEGYBLOCK *sbPtr
while(vPtr->vmod_type != vmtype_term)
{
MODULE *mptr;
MODULE *mptr = NULL;
/* consider this module */
if(vPtr->vmod_mref.mref_ptr)
if(vPtr->vmod_mref.mref_ptr != NULL)
{
mptr = vPtr->vmod_mref.mref_ptr;
if(ModuleCurrVisArray[mptr->m_index] == 2)
@ -269,7 +269,7 @@ int ThisObjectIsInAModuleVisibleFromCurrentlyVisibleModules(STRATEGYBLOCK *sbPtr
/* If the door/viewport is closed... */
/* Branch to this vPtr */
/* else vPtr++; */
if(mptr)
if(mptr != NULL)
{
if(mptr->m_flags & m_flag_open) vPtr++;
else vPtr = vPtr->vmod_data.vmodidata_ptr;
@ -1039,6 +1039,7 @@ int IsModuleVisibleFromModule(MODULE *source, MODULE *target) {
int gotit;
vptr=source->m_vmptr;
mptr=NULL;
gotit=0;
if ((source==NULL)||(target==NULL)) return(0);

View file

@ -465,7 +465,8 @@ LIGHTBLOCK* AddLightBlock(DISPLAYBLOCK *dptr, LIGHTBLOCK *lptr_to_add)
lfree = No;
larrayptr = &dptr->ObLights[0];
freelarrayptr = NULL;
for(i = MaxObjectLights; i!=0 && lfree == No; i--) {
if(*larrayptr == 0) {