diff options
author | Andrew Meadows <andrew@lindenlab.com> | 2013-01-04 03:02:54 +0000 |
---|---|---|
committer | Andrew Meadows <andrew@lindenlab.com> | 2013-01-04 03:02:54 +0000 |
commit | 019836a39667889d4347277cde82270113992bb6 (patch) | |
tree | 50345c6fb016dc2d0910ac7a39a5317da511ef59 | |
parent | 6e82bb7789c1e046dcfb97c6773150df110153f8 (diff) |
More fixes for linux build of lltrace changes
-rw-r--r-- | indra/cmake/00-Common.cmake | 2 | ||||
-rw-r--r-- | indra/llcommon/llerrorlegacy.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llunit.h | 11 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llworldmapmessage.h | 2 |
5 files changed, 16 insertions, 14 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index d9553b9a7e..af3689c641 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -216,7 +216,7 @@ endif (DARWIN) if (LINUX OR DARWIN) - set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs") + set(GCC_WARNINGS "-Wall -Wno-unused-but-set-variable -Wno-sign-compare -Wno-trigraphs") if (NOT GCC_DISABLE_FATAL_WARNINGS) set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index 58cc2899af..097a533b1a 100644 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -114,8 +114,10 @@ const int LL_ERR_PRICE_MISMATCH = -23018; #ifdef LL_WINDOWS #define llstatic_assert(func, msg) static_assert(func, msg) +#define llstatic_assert_template(type, func, msg) static_assert(func, msg) #else #define llstatic_assert(func, msg) BOOST_STATIC_ASSERT(func) +#define llstatic_assert_template(type, func, msg) BOOST_STATIC_ASSERT(sizeof(type) != 0 && func); #endif // handy compile-time assert - enforce those template parameters! diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 72a6020ff8..c600883607 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -29,6 +29,7 @@ #include "stdtypes.h" #include "llpreprocessor.h" +#include "llerrorlegacy.h" namespace LLUnits { @@ -53,7 +54,7 @@ struct ConversionFactor static typename HighestPrecisionType<VALUE_TYPE>::type_t get() { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - llstatic_assert(sizeof(DERIVED_UNITS_TAG) == 0, "Cannot convert between types."); + llstatic_assert_template(DERIVED_UNITS_TAG, false, "Cannot convert between types."); } }; @@ -141,7 +142,7 @@ struct LLUnit void operator *= (LLUnit<OTHER_UNIT, OTHER_STORAGE> multiplicand) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - llstatic_assert(sizeof(OTHER_UNIT) == 0, "Multiplication of unit types not supported."); + llstatic_assert_template(OTHER_UNIT, 0, "Multiplication of unit types not supported."); } void operator /= (storage_t divisor) @@ -153,7 +154,7 @@ struct LLUnit void operator /= (LLUnit<OTHER_UNIT, OTHER_STORAGE> divisor) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - llstatic_assert(sizeof(OTHER_UNIT) == 0, "Illegal in-place division of unit types."); + llstatic_assert_template(OTHER_UNIT, 0, "Illegal in-place division of unit types."); } template<typename SOURCE_UNITS, typename SOURCE_STORAGE> @@ -313,7 +314,7 @@ template<typename UNIT_TYPE1, typename STORAGE_TYPE1, typename UNIT_TYPE2, typen LLUnit<UNIT_TYPE1, STORAGE_TYPE1> operator * (LLUnit<UNIT_TYPE1, STORAGE_TYPE1>, LLUnit<UNIT_TYPE2, STORAGE_TYPE2>) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - llstatic_assert(sizeof(STORAGE_TYPE1) == 0, "Multiplication of unit types results in new unit type - not supported."); + llstatic_assert_template(STORAGE_TYPE1, 0, "Multiplication of unit types results in new unit type - not supported."); return LLUnit<UNIT_TYPE1, STORAGE_TYPE1>(); } @@ -333,7 +334,7 @@ template<typename UNIT_TYPE1, typename STORAGE_TYPE1, typename UNIT_TYPE2, typen LLUnitImplicit<UNIT_TYPE1, STORAGE_TYPE1> operator * (LLUnitImplicit<UNIT_TYPE1, STORAGE_TYPE1>, LLUnitImplicit<UNIT_TYPE2, STORAGE_TYPE2>) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - llstatic_assert(sizeof(STORAGE_TYPE1) == 0, "Multiplication of unit types results in new unit type - not supported."); + llstatic_assert_template(STORAGE_TYPE1, 0, "Multiplication of unit types results in new unit type - not supported."); return LLUnitImplicit<UNIT_TYPE1, STORAGE_TYPE1>(); } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 54b67832ea..47ba0c4fc4 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6066,12 +6066,13 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) S32 max_t = volume->getPath().mPath.size(); // S32 i; - S32 num_vertices = 0, num_indices = 0; + //S32 num_vertices = 0; + //S32 num_indices = 0; S32 grid_size = (profile.size()-1)/4; - S32 quad_count = (grid_size * grid_size); + //S32 quad_count = (grid_size * grid_size); - num_vertices = (grid_size+1)*(grid_size+1); - num_indices = quad_count * 4; + //num_vertices = (grid_size+1)*(grid_size+1); + //num_indices = quad_count * 4; LLVector4a& min = mExtents[0]; LLVector4a& max = mExtents[1]; @@ -6667,10 +6668,6 @@ void LLVolumeFace::resizeVertices(S32 num_verts) mPositions = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); ll_assert_aligned(mPositions, 16); mNormals = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); - if ( ((int)mNormals & 0xF) != 0 ) - { - __debugbreak(); - } ll_assert_aligned(mNormals, 16); //pad texture coordinate block end to allow for QWORD reads diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h index 12b6ef4792..ac1ea1607c 100644 --- a/indra/newview/llworldmapmessage.h +++ b/indra/newview/llworldmapmessage.h @@ -27,6 +27,8 @@ #ifndef LL_LLWORLDMAPMESSAGE_H #define LL_LLWORLDMAPMESSAGE_H +#include "boost/function.hpp" + // Handling of messages (send and process) as well as SLURL callback if necessary class LLMessageSystem; |