War on -Werror, part 13: hodgehodge.
This commit is contained in:
+9
-3
@@ -1551,6 +1551,8 @@ bool GameState::ShowW1() const
|
||||
case ALLOW_W1_EVERYWHERE: return true;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
// it should never hit here.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2424,7 +2426,7 @@ public:
|
||||
LuaHelpers::CreateTableFromArray( vHP, L );
|
||||
return 1;
|
||||
}
|
||||
static int GetEnabledPlayers(T* p, lua_State *L )
|
||||
static int GetEnabledPlayers(T* , lua_State *L )
|
||||
{
|
||||
vector<PlayerNumber> vEP;
|
||||
FOREACH_EnabledPlayer( pn )
|
||||
@@ -2438,7 +2440,7 @@ public:
|
||||
LuaHelpers::Push( L, pStyle );
|
||||
return 1;
|
||||
}
|
||||
static int IsAnyHumanPlayerUsingMemoryCard( T* p, lua_State *L )
|
||||
static int IsAnyHumanPlayerUsingMemoryCard( T* , lua_State *L )
|
||||
{
|
||||
bool bUsingMemoryCard = false;
|
||||
FOREACH_HumanPlayer( pn )
|
||||
@@ -2449,7 +2451,11 @@ public:
|
||||
lua_pushboolean(L, bUsingMemoryCard );
|
||||
return 1;
|
||||
}
|
||||
static int GetNumStagesForCurrentSongAndStepsOrCourse( T* p, lua_State *L ) { lua_pushnumber(L, GAMESTATE->GetNumStagesForCurrentSongAndStepsOrCourse() ); return 1; }
|
||||
static int GetNumStagesForCurrentSongAndStepsOrCourse( T* , lua_State *L )
|
||||
{
|
||||
lua_pushnumber(L, GAMESTATE->GetNumStagesForCurrentSongAndStepsOrCourse() );
|
||||
return 1;
|
||||
}
|
||||
static int GetNumStagesLeft( T* p, lua_State *L )
|
||||
{
|
||||
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
|
||||
|
||||
@@ -580,8 +580,10 @@ const RString& ProfileManager::GetProfileDir( ProfileSlot slot ) const
|
||||
case ProfileSlot_Machine:
|
||||
return MACHINE_PROFILE_DIR;
|
||||
default:
|
||||
ASSERT(0);
|
||||
break;
|
||||
}
|
||||
// it should never hit here.
|
||||
FAIL_M("Invalid profile slot chosen: unable to get the directory!");
|
||||
}
|
||||
|
||||
RString ProfileManager::GetProfileDirImportedFrom( ProfileSlot slot ) const
|
||||
@@ -596,6 +598,8 @@ RString ProfileManager::GetProfileDirImportedFrom( ProfileSlot slot ) const
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
// it should never hit here.
|
||||
return RString();
|
||||
}
|
||||
|
||||
const Profile* ProfileManager::GetProfile( ProfileSlot slot ) const
|
||||
@@ -610,6 +614,8 @@ const Profile* ProfileManager::GetProfile( ProfileSlot slot ) const
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
// it should never hit here.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -822,7 +828,7 @@ public:
|
||||
static int IsPersistentProfile( T* p, lua_State *L ) { lua_pushboolean(L, p->IsPersistentProfile(Enum::Check<PlayerNumber>(L, 1)) ); return 1; }
|
||||
static int GetProfile( T* p, lua_State *L ) { PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1); Profile* pP = p->GetProfile(pn); ASSERT(pP != NULL); pP->PushSelf(L); return 1; }
|
||||
static int GetMachineProfile( T* p, lua_State *L ) { p->GetMachineProfile()->PushSelf(L); return 1; }
|
||||
static int SaveMachineProfile( T* p, lua_State *L ) { p->SaveMachineProfile(); return 0; }
|
||||
static int SaveMachineProfile( T* p, lua_State * ) { p->SaveMachineProfile(); return 0; }
|
||||
static int GetLocalProfile( T* p, lua_State *L )
|
||||
{
|
||||
Profile *pProfile = p->GetLocalProfile(SArg(1));
|
||||
@@ -842,7 +848,7 @@ public:
|
||||
static int LastLoadWasTamperedOrCorrupt( T* p, lua_State *L ) { lua_pushboolean(L, p->LastLoadWasTamperedOrCorrupt(Enum::Check<PlayerNumber>(L, 1)) ); return 1; }
|
||||
static int GetPlayerName( T* p, lua_State *L ) { PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1); lua_pushstring(L, p->GetPlayerName(pn)); return 1; }
|
||||
|
||||
static int LocalProfileIDToDir( T* p, lua_State *L )
|
||||
static int LocalProfileIDToDir( T* , lua_State *L )
|
||||
{
|
||||
RString dir = USER_PROFILES_DIR + SArg(1) + "/";
|
||||
lua_pushstring( L, dir );
|
||||
|
||||
@@ -185,7 +185,7 @@ static LocalizedString D3D_NOT_INSTALLED ( "RageDisplay_D3D", "DirectX 8.1 or gr
|
||||
const RString D3D_URL = "http://www.microsoft.com/downloads/details.aspx?FamilyID=a19bed22-0b25-4e5d-a584-6389d8a3dad0&displaylang=en";
|
||||
static LocalizedString HARDWARE_ACCELERATION_NOT_AVAILABLE ( "RageDisplay_D3D",
|
||||
"Your system is reporting that Direct3D hardware acceleration is not available. Please obtain an updated driver from your video card manufacturer." );
|
||||
RString RageDisplay_D3D::Init( const VideoModeParams &p, bool bAllowUnacceleratedRenderer )
|
||||
RString RageDisplay_D3D::Init( const VideoModeParams &p, bool /* bAllowUnacceleratedRenderer */ )
|
||||
{
|
||||
GraphicsWindow::Initialize( true );
|
||||
|
||||
@@ -661,7 +661,7 @@ RageSurface* RageDisplay_D3D::CreateScreenshot()
|
||||
}
|
||||
|
||||
RageSurface *surface = CreateSurfaceFromPixfmt( PixelFormat_RGBA8, lr.pBits, desc.Width, desc.Height, lr.Pitch);
|
||||
ASSERT( surface );
|
||||
ASSERT( surface != NULL );
|
||||
|
||||
// We need to make a copy, since lr.pBits will go away when we call UnlockRect().
|
||||
RageSurface *SurfaceCopy =
|
||||
@@ -1406,7 +1406,7 @@ void RageDisplay_D3D::UpdateTexture(
|
||||
ASSERT( texpixfmt != NUM_PixelFormat );
|
||||
|
||||
RageSurface *Texture = CreateSurfaceFromPixfmt(PixelFormat(texpixfmt), lr.pBits, width, height, lr.Pitch);
|
||||
ASSERT( Texture );
|
||||
ASSERT( Texture != NULL );
|
||||
RageSurfaceUtils::Blit( img, Texture, width, height );
|
||||
|
||||
delete Texture;
|
||||
|
||||
+3
-3
@@ -53,7 +53,7 @@ RageSound::RageSound():
|
||||
m_iStoppedSourceFrame(0), m_bPlaying(false),
|
||||
m_bDeleteWhenFinished(false), m_sError("")
|
||||
{
|
||||
ASSERT( SOUNDMAN );
|
||||
ASSERT( SOUNDMAN != NULL );
|
||||
}
|
||||
|
||||
RageSound::~RageSound()
|
||||
@@ -65,7 +65,7 @@ RageSound::RageSound( const RageSound &cpy ):
|
||||
RageSoundBase( cpy ),
|
||||
m_Mutex( "RageSound" )
|
||||
{
|
||||
ASSERT(SOUNDMAN);
|
||||
ASSERT(SOUNDMAN != NULL);
|
||||
|
||||
m_pSource = NULL;
|
||||
|
||||
@@ -266,7 +266,7 @@ int RageSound::GetDataToPlay( float *pBuffer, int iFrames, int64_t &iStreamFrame
|
||||
// LockMut(m_Mutex);
|
||||
|
||||
ASSERT_M( m_bPlaying, ssprintf("%p", this) );
|
||||
ASSERT( m_pSource );
|
||||
ASSERT( m_pSource != NULL );
|
||||
|
||||
iFramesStored = 0;
|
||||
iStreamFrame = m_iStreamFrame;
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
virtual RageSoundReader *Copy() const = 0;
|
||||
virtual int GetSampleRate() const = 0;
|
||||
virtual unsigned GetNumChannels() const = 0;
|
||||
virtual bool SetProperty( const RString &sProperty, float fValue ) { return false; }
|
||||
virtual bool SetProperty( const RString & /* sProperty */, float /* fValue */ ) { return false; }
|
||||
virtual RageSoundReader *GetSource() { return NULL; }
|
||||
|
||||
/* Return values for Read(). */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
RageSoundReader_Extend::RageSoundReader_Extend( RageSoundReader *pSource ):
|
||||
RageSoundReader_Filter( pSource )
|
||||
{
|
||||
ASSERT_M(pSource, "The music file was not found! Was it deleted or moved while the game was on?");
|
||||
ASSERT_M(pSource != NULL, "The music file was not found! Was it deleted or moved while the game was on?");
|
||||
m_iPositionFrames = pSource->GetNextSourceFrame();
|
||||
|
||||
m_StopMode = M_STOP;
|
||||
|
||||
@@ -47,7 +47,7 @@ int RageSoundReader_Preload::GetTotalFrames() const
|
||||
|
||||
bool RageSoundReader_Preload::Open( RageSoundReader *pSource )
|
||||
{
|
||||
ASSERT( pSource );
|
||||
ASSERT( pSource != NULL );
|
||||
m_iSampleRate = pSource->GetSampleRate();
|
||||
m_iChannels = pSource->GetNumChannels();
|
||||
m_fRate = pSource->GetStreamToSourceRatio();
|
||||
|
||||
@@ -667,7 +667,7 @@ int RageSoundReader_Resample_Good::Read( float *pBuf, int iFrames )
|
||||
{
|
||||
int iFramesNeeded = m_apResamplers[0]->NumInputsForOutputSamples(iFrames);
|
||||
float *pTmpBuf = (float *) alloca( iFramesNeeded * sizeof(float) * iChannels );
|
||||
ASSERT( pTmpBuf );
|
||||
ASSERT( pTmpBuf != NULL );
|
||||
int iFramesIn = m_pSource->Read( pTmpBuf, iFramesNeeded );
|
||||
if( iFramesIn < 0 )
|
||||
return iFramesIn;
|
||||
|
||||
@@ -261,7 +261,7 @@ int RageSoundReader_Vorbisfile::Read( float *buf, int iFrames )
|
||||
|
||||
int RageSoundReader_Vorbisfile::GetSampleRate() const
|
||||
{
|
||||
ASSERT(vf);
|
||||
ASSERT(vf != NULL);
|
||||
|
||||
vorbis_info *vi = ov_info(vf, -1);
|
||||
ASSERT(vi != NULL);
|
||||
@@ -271,7 +271,7 @@ int RageSoundReader_Vorbisfile::GetSampleRate() const
|
||||
|
||||
int RageSoundReader_Vorbisfile::GetNextSourceFrame() const
|
||||
{
|
||||
ASSERT(vf);
|
||||
ASSERT(vf != NULL);
|
||||
|
||||
int iFrame = (int)ov_pcm_tell( vf );
|
||||
return iFrame;
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
const RageTimer RageZeroTimer(0,0);
|
||||
static uint64_t g_iStartTime = ArchHooks::GetMicrosecondsSinceStart( true );
|
||||
|
||||
static uint64_t GetTime( bool bAccurate )
|
||||
static uint64_t GetTime( bool /* bAccurate */ )
|
||||
{
|
||||
return ArchHooks::GetMicrosecondsSinceStart( true );
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
bool IsPaused() const { return m_bPaused; }
|
||||
|
||||
protected:
|
||||
virtual void UpdateStageStats( MultiPlayer mp ) {}; // overridden for multiplayer
|
||||
virtual void UpdateStageStats( MultiPlayer /* mp */ ) {}; // overridden for multiplayer
|
||||
|
||||
virtual bool UseSongBackgroundAndForeground() const { return true; }
|
||||
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ XNode *XNode::AppendChild( XNode *node )
|
||||
}
|
||||
|
||||
// detach node and delete object
|
||||
bool XNode::RemoveChild( XNode *node, bool bDelete )
|
||||
bool XNode::RemoveChild( XNode *node, bool /* bDelete */ )
|
||||
{
|
||||
XNodes::iterator it = find( m_childs.begin(), m_childs.end(), node );
|
||||
if( it == m_childs.end() )
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
HWND GetHwnd() { return m_hWnd; }
|
||||
|
||||
protected:
|
||||
virtual bool HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam ) { return false; }
|
||||
virtual bool HandleMessage( UINT /* msg */, WPARAM /* wParam */, LPARAM /* lParam */ ) { return false; }
|
||||
void StopRunning();
|
||||
|
||||
private:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#if defined(WINDOWS)
|
||||
int main( int argc, char* argv[] );
|
||||
int __stdcall WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, char *pCmdLine, int nCmdShow )
|
||||
int __stdcall WinMain( HINSTANCE /* hInstance */, HINSTANCE /* hPrevInstance */, char * /* pCmdLine */, int /* nCmdShow */ )
|
||||
{
|
||||
char **argv;
|
||||
int argc = GetWin32CmdLine( argv );
|
||||
|
||||
Reference in New Issue
Block a user