war on -Werror, part 7: start informal params.

I'm preserving our numbering Pohly. ;)
This commit is contained in:
Jason Felds
2012-12-26 23:23:59 -05:00
parent 7f4e97d72a
commit 4f07a0ea8b
12 changed files with 69 additions and 66 deletions
+1 -1
View File
@@ -1278,7 +1278,7 @@ NoteData::_all_tracks_iterator<ND, iter, TN> &NoteData::_all_tracks_iterator<ND,
} }
template<typename ND, typename iter, typename TN> template<typename ND, typename iter, typename TN>
NoteData::_all_tracks_iterator<ND, iter, TN> NoteData::_all_tracks_iterator<ND, iter, TN>::operator++( int dummy ) // postincrement NoteData::_all_tracks_iterator<ND, iter, TN> NoteData::_all_tracks_iterator<ND, iter, TN>::operator++( int ) // postincrement
{ {
_all_tracks_iterator<ND, iter, TN> ret( *this ); _all_tracks_iterator<ND, iter, TN> ret( *this );
operator++(); operator++();
+1 -1
View File
@@ -373,7 +373,7 @@ static void SortNoteSkins( vector<RString> &asSkinNames )
class OptionRowHandlerListNoteSkins : public OptionRowHandlerList class OptionRowHandlerListNoteSkins : public OptionRowHandlerList
{ {
virtual void LoadInternal( const Commands &cmds ) virtual void LoadInternal( const Commands & )
{ {
m_Def.m_sName = "NoteSkins"; m_Def.m_sName = "NoteSkins";
m_Def.m_bOneChoiceForAllPlayers = false; m_Def.m_bOneChoiceForAllPlayers = false;
+9 -9
View File
@@ -227,12 +227,12 @@ public:
virtual RageTextureLock *CreateTextureLock() { return NULL; } virtual RageTextureLock *CreateTextureLock() { return NULL; }
virtual void ClearAllTextures() = 0; virtual void ClearAllTextures() = 0;
virtual int GetNumTextureUnits() = 0; virtual int GetNumTextureUnits() = 0;
virtual void SetTexture( TextureUnit tu, unsigned iTexture ) = 0; virtual void SetTexture( TextureUnit, unsigned /* iTexture */ ) = 0;
virtual void SetTextureMode( TextureUnit tu, TextureMode tm ) = 0; virtual void SetTextureMode( TextureUnit, TextureMode ) = 0;
virtual void SetTextureWrapping( TextureUnit tu, bool b ) = 0; virtual void SetTextureWrapping( TextureUnit, bool ) = 0;
virtual int GetMaxTextureSize() const = 0; virtual int GetMaxTextureSize() const = 0;
virtual void SetTextureFiltering( TextureUnit tu, bool b ) = 0; virtual void SetTextureFiltering( TextureUnit, bool ) = 0;
virtual void SetEffectMode( EffectMode effect ) { } virtual void SetEffectMode( EffectMode ) { }
virtual bool IsEffectModeSupported( EffectMode effect ) { return effect == EffectMode_Normal; } virtual bool IsEffectModeSupported( EffectMode effect ) { return effect == EffectMode_Normal; }
bool SupportsRenderToTexture() const { return false; } 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 is true the first time a render target is used, behave as if
* bPreserveTexture was false. * 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 IsZTestEnabled() const = 0;
virtual bool IsZWriteEnabled() const = 0; virtual bool IsZWriteEnabled() const = 0;
virtual void SetZWrite( bool b ) = 0; virtual void SetZWrite( bool ) = 0;
virtual void SetZTestMode( ZTestMode mode ) = 0; virtual void SetZTestMode( ZTestMode ) = 0;
virtual void SetZBias( float f ) = 0; virtual void SetZBias( float ) = 0;
virtual void ClearZBuffer() = 0; virtual void ClearZBuffer() = 0;
virtual void SetCullMode( CullMode mode ) = 0; virtual void SetCullMode( CullMode mode ) = 0;
+1 -1
View File
@@ -74,7 +74,7 @@ RageDisplay_Null::RageDisplay_Null()
LOG->MapLog("renderer", "Current renderer: 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; bool bIgnore = false;
SetVideoMode( p, bIgnore ); SetVideoMode( p, bIgnore );
+29 -29
View File
@@ -16,55 +16,55 @@ public:
bool BeginFrame() { return true; } bool BeginFrame() { return true; }
void EndFrame(); void EndFrame();
VideoModeParams GetActualVideoModeParams() const { return m_Params; } VideoModeParams GetActualVideoModeParams() const { return m_Params; }
void SetBlendMode( BlendMode mode ) { } void SetBlendMode( BlendMode ) { }
bool SupportsTextureFormat( PixelFormat pixfmt, bool realtime=false ) { return true; } bool SupportsTextureFormat( PixelFormat, bool realtime=false ) { return true; }
bool SupportsPerVertexMatrixScale() { return false; } bool SupportsPerVertexMatrixScale() { return false; }
unsigned CreateTexture( unsigned CreateTexture(
PixelFormat pixfmt, PixelFormat,
RageSurface* img, RageSurface* /* img */,
bool bGenerateMipMaps ) { return 1; } bool /* bGenerateMipMaps */ ) { return 1; }
void UpdateTexture( void UpdateTexture(
unsigned iTexHandle, unsigned iTexHandle,
RageSurface* img, RageSurface* img,
int xoffset, int yoffset, int width, int height int xoffset, int yoffset, int width, int height
) { } ) { }
void DeleteTexture( unsigned iTexHandle ) { } void DeleteTexture( unsigned /* iTexHandle */ ) { }
void ClearAllTextures() { } void ClearAllTextures() { }
int GetNumTextureUnits() { return 1; } int GetNumTextureUnits() { return 1; }
void SetTexture( TextureUnit tu, unsigned iTexture ) { } void SetTexture( TextureUnit tu, unsigned iTexture ) { }
void SetTextureMode( TextureUnit tu, TextureMode tm ) { } void SetTextureMode( TextureUnit tu, TextureMode tm ) { }
void SetTextureWrapping( TextureUnit tu, bool b ) { } void SetTextureWrapping( TextureUnit tu, bool ) { }
int GetMaxTextureSize() const { return 2048; } int GetMaxTextureSize() const { return 2048; }
void SetTextureFiltering( TextureUnit tu, bool b ) { } void SetTextureFiltering( TextureUnit tu, bool ) { }
bool IsZWriteEnabled() const { return false; } bool IsZWriteEnabled() const { return false; }
bool IsZTestEnabled() const { return false; } bool IsZTestEnabled() const { return false; }
void SetZWrite( bool b ) { } void SetZWrite( bool ) { }
void SetZBias( float f ) { } void SetZBias( float ) { }
void SetZTestMode( ZTestMode mode ) { } void SetZTestMode( ZTestMode ) { }
void ClearZBuffer() { } void ClearZBuffer() { }
void SetCullMode( CullMode mode ) { } void SetCullMode( CullMode ) { }
void SetAlphaTest( bool b ) { } void SetAlphaTest( bool ) { }
void SetMaterial( void SetMaterial(
const RageColor &emissive, const RageColor & /* unreferenced: emissive */,
const RageColor &ambient, const RageColor & /* unreferenced: ambient */,
const RageColor &diffuse, const RageColor & /* unreferenced: diffuse */,
const RageColor &specular, const RageColor & /* unreferenced: specular */,
float shininess float /* unreferenced: shininess */
) { } ) { }
void SetLighting( bool b ) { } void SetLighting( bool ) { }
void SetLightOff( int index ) { } void SetLightOff( int /* index */ ) { }
void SetLightDirectional( void SetLightDirectional(
int index, int index,
const RageColor &ambient, const RageColor & /* unreferenced: ambient */,
const RageColor &diffuse, const RageColor & /* unreferenced: diffuse */,
const RageColor &specular, const RageColor & /* unreferenced: specular */,
const RageVector3 &dir ) { } const RageVector3 & /* unreferenced: dir */ ) { }
void SetSphereEnvironmentMapping( TextureUnit tu, bool b ) { } void SetSphereEnvironmentMapping( TextureUnit /* tu */, bool /* b */ ) { }
void SetCelShaded( int stage ) { } void SetCelShaded( int /* stage */ ) { }
RageCompiledGeometry* CreateCompiledGeometry(); RageCompiledGeometry* CreateCompiledGeometry();
void DeleteCompiledGeometry( RageCompiledGeometry* p ); void DeleteCompiledGeometry( RageCompiledGeometry* );
protected: protected:
void DrawQuadsInternal( const RageSpriteVertex v[], int iNumVerts ) { } void DrawQuadsInternal( const RageSpriteVertex v[], int iNumVerts ) { }
@@ -77,10 +77,10 @@ protected:
void DrawSymmetricQuadStripInternal( const RageSpriteVertex v[], int iNumVerts ) { } void DrawSymmetricQuadStripInternal( const RageSpriteVertex v[], int iNumVerts ) { }
VideoModeParams m_Params; 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(); RageSurface* CreateScreenshot();
RageMatrix GetOrthoMatrix( float l, float r, float b, float t, float zn, float zf ); 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 #endif
+3 -3
View File
@@ -37,9 +37,9 @@ public:
ScoreKeeper( PlayerState *pPlayerState, PlayerStageStats *pPlayerStageStats ); ScoreKeeper( PlayerState *pPlayerState, PlayerStageStats *pPlayerStageStats );
virtual ~ScoreKeeper() { } virtual ~ScoreKeeper() { }
virtual void Load( virtual void Load(
const vector<Song*> &apSongs, const vector<Song*> &,
const vector<Steps*> &apSteps, const vector<Steps*> &,
const vector<AttackArray> &asModifiers ) { } const vector<AttackArray> & ) { }
virtual void DrawPrimitives() { } virtual void DrawPrimitives() { }
virtual void Update( float fDelta ) { } virtual void Update( float fDelta ) { }
+13 -13
View File
@@ -126,20 +126,20 @@ public:
RString GetPrevScreen() const; RString GetPrevScreen() const;
// let subclass override if they want // let subclass override if they want
virtual void MenuUp(const InputEventPlus &input) { } virtual void MenuUp(const InputEventPlus &) { }
virtual void MenuDown(const InputEventPlus &input) { } virtual void MenuDown(const InputEventPlus &) { }
virtual void MenuLeft(const InputEventPlus &input) { } virtual void MenuLeft(const InputEventPlus &) { }
virtual void MenuRight(const InputEventPlus &input) { } virtual void MenuRight(const InputEventPlus &) { }
virtual void MenuStart(const InputEventPlus &input) { } virtual void MenuStart(const InputEventPlus &) { }
virtual void MenuSelect(const InputEventPlus &input) { } virtual void MenuSelect(const InputEventPlus &) { }
virtual void MenuBack(const InputEventPlus &input) { } virtual void MenuBack(const InputEventPlus &) { }
virtual void MenuCoin(const InputEventPlus &input) { } virtual void MenuCoin(const InputEventPlus &) { }
// todo? -aj // todo? -aj
//virtual void LeftClick(const InputEventPlus &input) { } //virtual void LeftClick(const InputEventPlus &) { }
//virtual void RightClick(const InputEventPlus &input) { } //virtual void RightClick(const InputEventPlus &) { }
//virtual void MiddleClick(const InputEventPlus &input) { } //virtual void MiddleClick(const InputEventPlus &) { }
//virtual void MouseWheelUp(const InputEventPlus &input) { } //virtual void MouseWheelUp(const InputEventPlus &) { }
//virtual void MouseWheelDown(const InputEventPlus &input) { } //virtual void MouseWheelDown(const InputEventPlus &) { }
}; };
#endif #endif
+1 -1
View File
@@ -448,7 +448,7 @@ void FixupPath( RString &path, const RString &sSongPath )
} }
// Songs in BlacklistImages will never be autodetected as song images. // 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. // We need to do this before calling any of HasMusic, HasHasCDTitle, etc.
ASSERT_M( m_sSongDir.Left(3) != "../", m_sSongDir ); // meaningless ASSERT_M( m_sSongDir.Left(3) != "../", m_sSongDir ); // meaningless
+1 -1
View File
@@ -23,7 +23,7 @@ StreamDisplay::StreamDisplay()
m_bAlwaysBounce = false; 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 // XXX: actually load from the metrics group passed in -aj
RString sMetricsGroup = "StreamDisplay"; RString sMetricsGroup = "StreamDisplay";
+1 -1
View File
@@ -78,7 +78,7 @@ struct TimingSegment
float GetBeat() const { return NoteRowToBeat(m_iStartRow); } float GetBeat() const { return NoteRowToBeat(m_iStartRow); }
void SetBeat( float fBeat ) { SetRow( BeatToNoteRow(fBeat) ); } void SetBeat( float fBeat ) { SetRow( BeatToNoteRow(fBeat) ); }
virtual RString ToString(int dec) const virtual RString ToString(int /* dec */) const
{ {
return FloatToString(GetBeat()); return FloatToString(GetBeat());
} }
+1 -1
View File
@@ -37,7 +37,7 @@ public:
/* If this is a second instance, return true. /* If this is a second instance, return true.
* Optionally, give focus to the existing window. */ * 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 ) { } virtual void SetTime( tm newtime ) { }
+8 -5
View File
@@ -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). 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 <exception> when exceptions disabled C2475: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast', bug in VC <exception> 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) C4201: nonstandard extension used : nameless struct/union (Windows headers do this)
C4786: turn off broken debugger warning C4786: turn off broken debugger warning
C4512: assignment operator could not be generated (so?) 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. blocks, try/catch blocks), and I've never found it to be useful.
C4702: assignment operator could not be generated (so?) C4702: assignment operator could not be generated (so?)
// "unreferenced formal parameter"; we *want* that in many cases // "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: C4063:
C4127:
C4786: VC6: identifier was truncated to '255' characters in the debug information C4786: VC6: identifier was truncated to '255' characters in the debug information
C4505: removed unferenced local function from integer.cpp & algebra.h C4505: removed unferenced local function from integer.cpp & algebra.h
C4244: converting of data = possible data loss. (This pragma should eventually go away) C4244: converting of data = possible data loss. (This pragma should eventually go away)