Skip to content

Commit

Permalink
Merge pull request #3 from Planimeter/feature/warnings
Browse files Browse the repository at this point in the history
Feature/warnings
  • Loading branch information
andrewmcwatters authored Dec 23, 2024
2 parents d4883f9 + 6a011ff commit d03c87d
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 4 deletions.
10 changes: 10 additions & 0 deletions mp/src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4672,6 +4672,9 @@ C_BaseAnimating *C_BaseAnimating::CreateRagdollCopy()
return pRagdoll;
}

// Function uses '18452' bytes of stack.Consider moving some data to heap.
#pragma warning( push )
#pragma warning( disable : 6262 )
C_BaseAnimating *C_BaseAnimating::BecomeRagdollOnClient()
{
MoveToLastReceivedPosition( true );
Expand Down Expand Up @@ -4704,6 +4707,7 @@ C_BaseAnimating *C_BaseAnimating::BecomeRagdollOnClient()

return pRagdoll;
}
#pragma warning( pop )

bool C_BaseAnimating::InitAsClientRagdoll( const matrix3x4_t *pDeltaBones0, const matrix3x4_t *pDeltaBones1, const matrix3x4_t *pCurrentBonePosition, float boneDt, bool bFixedConstraints )
{
Expand Down Expand Up @@ -6089,7 +6093,10 @@ void C_BaseAnimating::DoMuzzleFlash()
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
#pragma warning( push )
#pragma warning( disable : 28251 )
void DevMsgRT( char const* pMsg, ... )
#pragma warning( pop )
{
if (gpGlobals->frametime != 0.0f)
{
Expand Down Expand Up @@ -6244,7 +6251,10 @@ void C_BaseAnimating::GetToolRecordingState( KeyValues *msg )

// Force the animation to drive bones
CStudioHdr *hdr = GetModelPtr();
#pragma warning( push )
#pragma warning( disable : 6255 )
matrix3x4_t *pBones = (matrix3x4_t*)_alloca( ( hdr ? hdr->numbones() : 1 ) * sizeof(matrix3x4_t) );
#pragma warning( pop )
if ( hdr )
{
SetupBones( pBones, hdr->numbones(), BONE_USED_BY_ANYTHING, gpGlobals->curtime );
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/client/c_baseanimating.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class CAttachmentData
QAngle m_angRotation;
Vector m_vOriginVelocity;
int m_nLastFramecount : 31;
int m_bAnglesComputed : 1;
unsigned int m_bAnglesComputed : 1;
};


Expand Down
Binary file modified mp/src/lib/public/mathlib.lib
Binary file not shown.
Binary file modified mp/src/lib/public/raytrace.lib
Binary file not shown.
Binary file modified mp/src/lib/public/tier1.lib
Binary file not shown.
Binary file modified mp/src/lib/public/vgui_controls.lib
Binary file not shown.
1 change: 1 addition & 0 deletions mp/src/public/haptics/ihaptics.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ abstract_class IHaptics
IEngineVGui* newvgui,
ActivityList_IndexForName_t actIndexForName,
ActivityList_NameForIndex_t actNameForIndex) = 0;
virtual ~IHaptics() {};

public: // Device methods

Expand Down
4 changes: 3 additions & 1 deletion mp/src/public/scratchpad3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ void CScratchPad3D::DrawPolygonsForPixels(
vTopRight = vTopLeft + vTopXInc;
vBottomRight = vBottomLeft + vBottomXInc;

#pragma warning( push )
#pragma warning( disable : 6011 )
SPRGBA *pSrc = &pData[ y * (pitchInBytes/sizeof(SPRGBA)) ];
for( int x=0; x < width; x++ )
{
Expand All @@ -543,6 +545,7 @@ void CScratchPad3D::DrawPolygonsForPixels(
vBottomLeft += vBottomXInc;
vBottomRight += vBottomXInc;
}
#pragma warning( pop )

vCurLeft += vLeftInc;
vNextLeft += vLeftInc;
Expand Down Expand Up @@ -632,4 +635,3 @@ IScratchPad3D* ScratchPad3D_Create( char const *pFilename )
return pRet;
}
#endif // POSIX

2 changes: 1 addition & 1 deletion mp/src/public/scratchpad3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CScratchPad3D : public IScratchPad3D
m_pCachedRenderData = NULL;
}

~CBaseCommand()
virtual ~CBaseCommand()
{
ReleaseCachedRenderData();
}
Expand Down
3 changes: 3 additions & 0 deletions mp/src/public/tier0/basetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ inline unsigned long FloatAbsBits( vec_t f )
#ifndef _In_
#define _In_
#endif
#pragma warning( push )
#pragma warning( disable : 28252 )
extern "C" float fabsf(_In_ float);
#pragma warning( pop )
#else
#include <math.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion mp/src/public/vgui_controls/Panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class IForceVirtualInheritancePanel
// This is designed as an easy-access to the vgui-functionality; for more
// low-level access to vgui functions use the IPanel/IClientPanel interfaces directly
//-----------------------------------------------------------------------------
class Panel : public IClientPanel, virtual IForceVirtualInheritancePanel
class Panel : public IClientPanel, public virtual IForceVirtualInheritancePanel
{
DECLARE_CLASS_SIMPLE_NOBASE( Panel );

Expand Down
3 changes: 3 additions & 0 deletions mp/src/public/vstdlib/jobthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,10 @@ class CParallelProcessor

if ( nJobs > 1 )
{
#pragma warning( push )
#pragma warning( disable : 6255 )
CJob **jobs = (CJob **)stackalloc( nJobs * sizeof(CJob **) );
#pragma warning( pop )
int i = nJobs;

while( i-- )
Expand Down
7 changes: 7 additions & 0 deletions mp/src/vpc_scripts/source_win32_base.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ $Configuration
$MultiProcessorCompilation "True"

// warning C4316: object allocated on the heap may not be aligned 16
// warning C4456: declaration of 'identifier' hides previous local declaration
// warning C4457: declaration of 'identifier' hides function parameter
// warning C4458: declaration of 'identifier' hides class member
// warning C4459: declaration of 'identifier' hides global declaration
// warning C4838: conversion from 'type_1' to 'type_2' requires a narrowing conversion
// warning C26495: Variable 'variable' is uninitialized. Always initialize a member variable (type.6).
$DisableSpecificWarnings "$BASE;4316" [$VS2013]
$DisableSpecificWarnings "$BASE;4316;4456;4457;4458;4459;4838;26495" [$VS2022]

// Having lots of warnings makes it harder to notice new, and possibly
// important warnings, both on buildbot and in the output window. Lots
Expand Down

0 comments on commit d03c87d

Please sign in to comment.