1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 03:56:10 +08:00

Allow compilation on gcc/clang without -Wno-unknown-pragmas.

This commit is contained in:
Nicholas Hastings
2013-10-06 13:46:15 -04:00
parent 34d4b05185
commit 9889382863
67 changed files with 218 additions and 17 deletions

View File

@ -16,7 +16,7 @@
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
#if !defined(COMPILER_MSVC64) && !defined(LINUX)
#if !defined(COMPILER_MSVC64) && !defined(POSIX)
// Implement for 64-bit Windows if needed.
// Clang hits "fatal error: error in backend:" and other errors when trying
// to compile the inline assembly below. 3DNow support is highly unlikely to

View File

@ -6,7 +6,10 @@
#include "mathlib/IceKey.H"
#include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning(disable: 4244)
#endif
/* Structure of a single round subkey */

View File

@ -106,8 +106,10 @@ ALIGN128 float power2_n[256] = // 2**(index - 128) / 255
// You can use this to double check the exponent table and assert that
// the precomputation is correct.
#ifdef DBGFLAG_ASSERT
#ifdef _WIN32
#pragma warning(push)
#pragma warning( disable : 4189 ) // disable unused local variable warning
#endif
static void CheckExponentTable()
{
for( int i = 0; i < 256; i++ )
@ -120,8 +122,10 @@ static void CheckExponentTable()
power2_n[i] == testAgainst );
}
}
#ifdef _WIN32
#pragma warning(pop)
#endif
#endif
void BuildGammaTable( float gamma, float texGamma, float brightness, int overbright )
{

View File

@ -16,8 +16,10 @@
#include "tier0/vprof.h"
//#define _VPROF_MATHLIB
#ifdef _WIN32
#pragma warning(disable:4244) // "conversion from 'const int' to 'float', possible loss of data"
#pragma warning(disable:4730) // "mixing _m64 and floating point expressions may result in incorrect code"
#endif
#include "mathlib/mathlib.h"
#include "mathlib/vector.h"

View File

@ -18,7 +18,9 @@
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning (disable : 4700) // local variable 'x' used without having been initialized
#endif
// ------------------------------------------------------------------------------------------- //
// Helper functions.