diff --git a/src/NoteData.cpp b/src/NoteData.cpp index 89698d79f2..7c29848c40 100644 --- a/src/NoteData.cpp +++ b/src/NoteData.cpp @@ -1278,7 +1278,7 @@ NoteData::_all_tracks_iterator &NoteData::_all_tracks_iterator -NoteData::_all_tracks_iterator NoteData::_all_tracks_iterator::operator++( int dummy ) // postincrement +NoteData::_all_tracks_iterator NoteData::_all_tracks_iterator::operator++( int ) // postincrement { _all_tracks_iterator ret( *this ); operator++(); diff --git a/src/OptionRowHandler.cpp b/src/OptionRowHandler.cpp index a02925be05..0c63cf1086 100644 --- a/src/OptionRowHandler.cpp +++ b/src/OptionRowHandler.cpp @@ -373,7 +373,7 @@ static void SortNoteSkins( vector &asSkinNames ) class OptionRowHandlerListNoteSkins : public OptionRowHandlerList { - virtual void LoadInternal( const Commands &cmds ) + virtual void LoadInternal( const Commands & ) { m_Def.m_sName = "NoteSkins"; m_Def.m_bOneChoiceForAllPlayers = false; diff --git a/src/RageDisplay.h b/src/RageDisplay.h index dd1e55d35f..2338fca0ae 100644 --- a/src/RageDisplay.h +++ b/src/RageDisplay.h @@ -227,12 +227,12 @@ public: virtual RageTextureLock *CreateTextureLock() { return NULL; } virtual void ClearAllTextures() = 0; virtual int GetNumTextureUnits() = 0; - virtual void SetTexture( TextureUnit tu, unsigned iTexture ) = 0; - virtual void SetTextureMode( TextureUnit tu, TextureMode tm ) = 0; - virtual void SetTextureWrapping( TextureUnit tu, bool b ) = 0; + virtual void SetTexture( TextureUnit, unsigned /* iTexture */ ) = 0; + virtual void SetTextureMode( TextureUnit, TextureMode ) = 0; + virtual void SetTextureWrapping( TextureUnit, bool ) = 0; virtual int GetMaxTextureSize() const = 0; - virtual void SetTextureFiltering( TextureUnit tu, bool b ) = 0; - virtual void SetEffectMode( EffectMode effect ) { } + virtual void SetTextureFiltering( TextureUnit, bool ) = 0; + virtual void SetEffectMode( EffectMode ) { } virtual bool IsEffectModeSupported( EffectMode effect ) { return effect == EffectMode_Normal; } bool SupportsRenderToTexture() const { return false; } @@ -250,13 +250,13 @@ public: * bPreserveTexture is true the first time a render target is used, behave as if * bPreserveTexture was false. */ - virtual void SetRenderTarget( unsigned iHandle, bool bPreserveTexture = true ) { } + virtual void SetRenderTarget( unsigned /* iHandle */, bool /* bPreserveTexture */ = true ) { } virtual bool IsZTestEnabled() const = 0; virtual bool IsZWriteEnabled() const = 0; - virtual void SetZWrite( bool b ) = 0; - virtual void SetZTestMode( ZTestMode mode ) = 0; - virtual void SetZBias( float f ) = 0; + virtual void SetZWrite( bool ) = 0; + virtual void SetZTestMode( ZTestMode ) = 0; + virtual void SetZBias( float ) = 0; virtual void ClearZBuffer() = 0; virtual void SetCullMode( CullMode mode ) = 0; diff --git a/src/RageDisplay_Null.cpp b/src/RageDisplay_Null.cpp index e4789b933d..0815006dce 100644 --- a/src/RageDisplay_Null.cpp +++ b/src/RageDisplay_Null.cpp @@ -74,7 +74,7 @@ RageDisplay_Null::RageDisplay_Null() LOG->MapLog("renderer", "Current renderer: null"); } -RString RageDisplay_Null::Init( const VideoModeParams &p, bool bAllowUnacceleratedRenderer ) +RString RageDisplay_Null::Init( const VideoModeParams &p, bool /* bAllowUnacceleratedRenderer */ ) { bool bIgnore = false; SetVideoMode( p, bIgnore ); diff --git a/src/RageDisplay_Null.h b/src/RageDisplay_Null.h index 12ec5169de..b05e425ed2 100644 --- a/src/RageDisplay_Null.h +++ b/src/RageDisplay_Null.h @@ -16,55 +16,55 @@ public: bool BeginFrame() { return true; } void EndFrame(); VideoModeParams GetActualVideoModeParams() const { return m_Params; } - void SetBlendMode( BlendMode mode ) { } - bool SupportsTextureFormat( PixelFormat pixfmt, bool realtime=false ) { return true; } + void SetBlendMode( BlendMode ) { } + bool SupportsTextureFormat( PixelFormat, bool realtime=false ) { return true; } bool SupportsPerVertexMatrixScale() { return false; } unsigned CreateTexture( - PixelFormat pixfmt, - RageSurface* img, - bool bGenerateMipMaps ) { return 1; } + PixelFormat, + RageSurface* /* img */, + bool /* bGenerateMipMaps */ ) { return 1; } void UpdateTexture( unsigned iTexHandle, RageSurface* img, int xoffset, int yoffset, int width, int height ) { } - void DeleteTexture( unsigned iTexHandle ) { } + void DeleteTexture( unsigned /* iTexHandle */ ) { } void ClearAllTextures() { } int GetNumTextureUnits() { return 1; } void SetTexture( TextureUnit tu, unsigned iTexture ) { } void SetTextureMode( TextureUnit tu, TextureMode tm ) { } - void SetTextureWrapping( TextureUnit tu, bool b ) { } + void SetTextureWrapping( TextureUnit tu, bool ) { } int GetMaxTextureSize() const { return 2048; } - void SetTextureFiltering( TextureUnit tu, bool b ) { } + void SetTextureFiltering( TextureUnit tu, bool ) { } bool IsZWriteEnabled() const { return false; } bool IsZTestEnabled() const { return false; } - void SetZWrite( bool b ) { } - void SetZBias( float f ) { } - void SetZTestMode( ZTestMode mode ) { } + void SetZWrite( bool ) { } + void SetZBias( float ) { } + void SetZTestMode( ZTestMode ) { } void ClearZBuffer() { } - void SetCullMode( CullMode mode ) { } - void SetAlphaTest( bool b ) { } + void SetCullMode( CullMode ) { } + void SetAlphaTest( bool ) { } void SetMaterial( - const RageColor &emissive, - const RageColor &ambient, - const RageColor &diffuse, - const RageColor &specular, - float shininess + const RageColor & /* unreferenced: emissive */, + const RageColor & /* unreferenced: ambient */, + const RageColor & /* unreferenced: diffuse */, + const RageColor & /* unreferenced: specular */, + float /* unreferenced: shininess */ ) { } - void SetLighting( bool b ) { } - void SetLightOff( int index ) { } + void SetLighting( bool ) { } + void SetLightOff( int /* index */ ) { } void SetLightDirectional( int index, - const RageColor &ambient, - const RageColor &diffuse, - const RageColor &specular, - const RageVector3 &dir ) { } + const RageColor & /* unreferenced: ambient */, + const RageColor & /* unreferenced: diffuse */, + const RageColor & /* unreferenced: specular */, + const RageVector3 & /* unreferenced: dir */ ) { } - void SetSphereEnvironmentMapping( TextureUnit tu, bool b ) { } - void SetCelShaded( int stage ) { } + void SetSphereEnvironmentMapping( TextureUnit /* tu */, bool /* b */ ) { } + void SetCelShaded( int /* stage */ ) { } RageCompiledGeometry* CreateCompiledGeometry(); - void DeleteCompiledGeometry( RageCompiledGeometry* p ); + void DeleteCompiledGeometry( RageCompiledGeometry* ); protected: void DrawQuadsInternal( const RageSpriteVertex v[], int iNumVerts ) { } @@ -77,10 +77,10 @@ protected: void DrawSymmetricQuadStripInternal( const RageSpriteVertex v[], int iNumVerts ) { } VideoModeParams m_Params; - RString TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut ) { m_Params = p; return RString(); } + RString TryVideoMode( const VideoModeParams &p, bool & /* bNewDeviceOut */ ) { m_Params = p; return RString(); } RageSurface* CreateScreenshot(); RageMatrix GetOrthoMatrix( float l, float r, float b, float t, float zn, float zf ); - bool SupportsSurfaceFormat( PixelFormat pixfmt ) { return true; } + bool SupportsSurfaceFormat( PixelFormat ) { return true; } }; #endif diff --git a/src/ScoreKeeper.h b/src/ScoreKeeper.h index b700199d72..a0ea752bc9 100644 --- a/src/ScoreKeeper.h +++ b/src/ScoreKeeper.h @@ -37,9 +37,9 @@ public: ScoreKeeper( PlayerState *pPlayerState, PlayerStageStats *pPlayerStageStats ); virtual ~ScoreKeeper() { } virtual void Load( - const vector &apSongs, - const vector &apSteps, - const vector &asModifiers ) { } + const vector &, + const vector &, + const vector & ) { } virtual void DrawPrimitives() { } virtual void Update( float fDelta ) { } diff --git a/src/Screen.h b/src/Screen.h index d030bf4773..2ff87d1699 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -126,20 +126,20 @@ public: RString GetPrevScreen() const; // let subclass override if they want - virtual void MenuUp(const InputEventPlus &input) { } - virtual void MenuDown(const InputEventPlus &input) { } - virtual void MenuLeft(const InputEventPlus &input) { } - virtual void MenuRight(const InputEventPlus &input) { } - virtual void MenuStart(const InputEventPlus &input) { } - virtual void MenuSelect(const InputEventPlus &input) { } - virtual void MenuBack(const InputEventPlus &input) { } - virtual void MenuCoin(const InputEventPlus &input) { } + virtual void MenuUp(const InputEventPlus &) { } + virtual void MenuDown(const InputEventPlus &) { } + virtual void MenuLeft(const InputEventPlus &) { } + virtual void MenuRight(const InputEventPlus &) { } + virtual void MenuStart(const InputEventPlus &) { } + virtual void MenuSelect(const InputEventPlus &) { } + virtual void MenuBack(const InputEventPlus &) { } + virtual void MenuCoin(const InputEventPlus &) { } // todo? -aj - //virtual void LeftClick(const InputEventPlus &input) { } - //virtual void RightClick(const InputEventPlus &input) { } - //virtual void MiddleClick(const InputEventPlus &input) { } - //virtual void MouseWheelUp(const InputEventPlus &input) { } - //virtual void MouseWheelDown(const InputEventPlus &input) { } + //virtual void LeftClick(const InputEventPlus &) { } + //virtual void RightClick(const InputEventPlus &) { } + //virtual void MiddleClick(const InputEventPlus &) { } + //virtual void MouseWheelUp(const InputEventPlus &) { } + //virtual void MouseWheelDown(const InputEventPlus &) { } }; #endif diff --git a/src/Song.cpp b/src/Song.cpp index d7be9ab51f..c5da1cb5f0 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -448,7 +448,7 @@ void FixupPath( RString &path, const RString &sSongPath ) } // Songs in BlacklistImages will never be autodetected as song images. -void Song::TidyUpData( bool fromCache, bool duringCache ) +void Song::TidyUpData( bool fromCache, bool /* duringCache */ ) { // We need to do this before calling any of HasMusic, HasHasCDTitle, etc. ASSERT_M( m_sSongDir.Left(3) != "../", m_sSongDir ); // meaningless diff --git a/src/StreamDisplay.cpp b/src/StreamDisplay.cpp index 007642f9da..f278f92c1b 100644 --- a/src/StreamDisplay.cpp +++ b/src/StreamDisplay.cpp @@ -23,7 +23,7 @@ StreamDisplay::StreamDisplay() m_bAlwaysBounce = false; } -void StreamDisplay::Load( const RString &_sMetricsGroup ) +void StreamDisplay::Load( const RString & /* unreferenced: _sMetricsGroup */) { // XXX: actually load from the metrics group passed in -aj RString sMetricsGroup = "StreamDisplay"; diff --git a/src/TimingSegments.h b/src/TimingSegments.h index 6a4167d568..ef2c5e5e26 100644 --- a/src/TimingSegments.h +++ b/src/TimingSegments.h @@ -78,7 +78,7 @@ struct TimingSegment float GetBeat() const { return NoteRowToBeat(m_iStartRow); } void SetBeat( float fBeat ) { SetRow( BeatToNoteRow(fBeat) ); } - virtual RString ToString(int dec) const + virtual RString ToString(int /* dec */) const { return FloatToString(GetBeat()); } diff --git a/src/arch/ArchHooks/ArchHooks.h b/src/arch/ArchHooks/ArchHooks.h index adedf20fd6..0cde69b027 100644 --- a/src/arch/ArchHooks/ArchHooks.h +++ b/src/arch/ArchHooks/ArchHooks.h @@ -37,7 +37,7 @@ public: /* If this is a second instance, return true. * Optionally, give focus to the existing window. */ - virtual bool CheckForMultipleInstances(int argc, char* argv[]) { return false; } + virtual bool CheckForMultipleInstances(int /* argc */, char* [] /* argv[] */) { return false; } virtual void SetTime( tm newtime ) { } diff --git a/src/archutils/Win32/arch_setup.h b/src/archutils/Win32/arch_setup.h index 30a179f72d..6c6cb91f2f 100644 --- a/src/archutils/Win32/arch_setup.h +++ b/src/archutils/Win32/arch_setup.h @@ -26,6 +26,13 @@ Enable them in the project file at your peril (or if you feel like learning of many pedantic style warnings and want to fix them). C2475: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast', bug in VC when exceptions disabled +C4100: unreferenced formal parameter + Many functions are like this, including virtual functions: unsure if it can be justified. + "case 'aaa' is not a valid value for switch of enum 'bbb' + Actually, this is a valid warning, but we do it all over the + place, eg. with ScreenMessages. Those should be fixed, but later. XXX +C4127: conditional expression is constant. + C4201: nonstandard extension used : nameless struct/union (Windows headers do this) C4786: turn off broken debugger warning C4512: assignment operator could not be generated (so?) @@ -33,12 +40,8 @@ C4512: assignment operator could not be generated (so?) blocks, try/catch blocks), and I've never found it to be useful. C4702: assignment operator could not be generated (so?) // "unreferenced formal parameter"; we *want* that in many cases -C4100: - "case 'aaa' is not a valid value for switch of enum 'bbb' - Actually, this is a valid warning, but we do it all over the - place, eg. with ScreenMessages. Those should be fixed, but later. XXX + C4063: -C4127: C4786: VC6: identifier was truncated to '255' characters in the debug information C4505: removed unferenced local function from integer.cpp & algebra.h C4244: converting of data = possible data loss. (This pragma should eventually go away)