diff --git a/Engine/source/console/cmdgram.cpp b/Engine/source/console/cmdgram.cpp index 0f6c8de71..33dc24203 100644 --- a/Engine/source/console/cmdgram.cpp +++ b/Engine/source/console/cmdgram.cpp @@ -2058,6 +2058,7 @@ yydestruct (yymsg, yytype, yyvaluep) if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + } diff --git a/Engine/source/console/simObject.cpp b/Engine/source/console/simObject.cpp index 3385f3a91..bd7c7a035 100644 --- a/Engine/source/console/simObject.cpp +++ b/Engine/source/console/simObject.cpp @@ -1446,6 +1446,7 @@ void SimObject::linkNamespaces() // No increasing parent reference counts is needed in this case. bool ok = superClassNamespacePackageRoot->classLinkTo( cppNamespace ); + TORQUE_UNUSED(ok); AssertFatal( ok, "SimObject::linkNamespaces - failed to link new namespace to c++ class name" ); parentNamespace = superClassNamespace; } diff --git a/Engine/source/core/util/str.cpp b/Engine/source/core/util/str.cpp index 9a89ef2a1..7b63de0f4 100644 --- a/Engine/source/core/util/str.cpp +++ b/Engine/source/core/util/str.cpp @@ -506,6 +506,7 @@ void* String::StringData::operator new( size_t size, U32 len ) void String::StringData::operator delete(void *ptr) { StringData* sub = static_cast(ptr); + TORQUE_UNUSED(sub); AssertFatal( sub->mRefCount == 0, "StringData::delete() - invalid refcount" ); #ifdef TORQUE_DEBUG diff --git a/Engine/source/core/util/zip/zipSubStream.cpp b/Engine/source/core/util/zip/zipSubStream.cpp index 4a38a955a..24049f609 100644 --- a/Engine/source/core/util/zip/zipSubStream.cpp +++ b/Engine/source/core/util/zip/zipSubStream.cpp @@ -436,6 +436,7 @@ bool ZipSubWStream::_write(const U32 numBytes, const void *pBuffer) } S32 retVal = deflate(m_pZipStream, Z_NO_FLUSH); + TORQUE_UNUSED(retVal); AssertFatal(retVal != Z_BUF_ERROR, "ZipSubWStream::_write: invalid buffer"); } diff --git a/Engine/source/environment/decalRoad.cpp b/Engine/source/environment/decalRoad.cpp index 7bd240095..6ded02026 100644 --- a/Engine/source/environment/decalRoad.cpp +++ b/Engine/source/environment/decalRoad.cpp @@ -786,6 +786,7 @@ void DecalRoad::prepRenderImage( SceneRenderState* state ) U32 idxCount = ( endBatch.endIndex - startIdx ) + 1; U32 triangleCount = idxCount / 3; + TORQUE_UNUSED(vertCount); AssertFatal( startVert + vertCount <= mVertCount, "DecalRoad, bad draw call!" ); AssertFatal( startIdx + triangleCount < mTriangleCount * 3, "DecalRoad, bad draw call!" ); diff --git a/Engine/source/forest/forestDataFile.cpp b/Engine/source/forest/forestDataFile.cpp index a6c6d9062..ad42a0067 100644 --- a/Engine/source/forest/forestDataFile.cpp +++ b/Engine/source/forest/forestDataFile.cpp @@ -198,6 +198,7 @@ bool ForestData::write( const char *path ) for ( U32 i=0; i < count; i++ ) { StringTableEntry localName = allDatablocks[i]->getInternalName(); + TORQUE_UNUSED(localName); AssertFatal( localName != NULL && localName[0] != '\0', "ForestData::write - ForestItemData had no internal name set!" ); stream.writeString( allDatablocks[i]->getInternalName() ); } diff --git a/Engine/source/gfx/bitmap/loaders/bitmapPng.cpp b/Engine/source/gfx/bitmap/loaders/bitmapPng.cpp index c0e05471c..952c5c279 100644 --- a/Engine/source/gfx/bitmap/loaders/bitmapPng.cpp +++ b/Engine/source/gfx/bitmap/loaders/bitmapPng.cpp @@ -76,6 +76,7 @@ static void pngReadDataFn(png_structp png_ptr, Stream *strm = (Stream*)png_get_io_ptr(png_ptr); bool success = strm->read(length, data); + TORQUE_UNUSED(success); AssertFatal(success, "pngReadDataFn - failed to read from stream!"); } @@ -89,6 +90,7 @@ static void pngWriteDataFn(png_structp png_ptr, Stream *strm = (Stream*)png_get_io_ptr(png_ptr); bool success = strm->write(length, data); + TORQUE_UNUSED(success); AssertFatal(success, "pngWriteDataFn - failed to write to stream!"); } diff --git a/Engine/source/gui/containers/guiSplitContainer.cpp b/Engine/source/gui/containers/guiSplitContainer.cpp index cf6cab46e..9fa18a210 100644 --- a/Engine/source/gui/containers/guiSplitContainer.cpp +++ b/Engine/source/gui/containers/guiSplitContainer.cpp @@ -350,6 +350,8 @@ bool GuiSplitContainer::resize( const Point2I &newPosition, const Point2I &newEx GuiContainer *panelTwo = dynamic_cast( at(1) ); // + TORQUE_UNUSED(panelOne); + TORQUE_UNUSED(panelTwo); AssertFatal( panelOne && panelTwo, "GuiSplitContainer::resize - Missing/Invalid Subordinate Controls! Split contained controls must derive from GuiContainer!" ); // We only need to update the split point if our second panel is fixed. diff --git a/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp b/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp index c2bf42834..db18fe32b 100644 --- a/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp +++ b/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp @@ -475,6 +475,8 @@ void DeferredPixelSpecularHLSL::processPix( Vector &component Var *d_specular = (Var*)LangElement::find( "d_specular" ); Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" ); + TORQUE_UNUSED(lightInfoSamp); + TORQUE_UNUSED(d_NL_Att); AssertFatal( lightInfoSamp && d_specular && d_NL_Att, "DeferredPixelSpecularHLSL::processPix - Something hosed the deferred features!" ); diff --git a/Engine/source/math/mathTypes.cpp b/Engine/source/math/mathTypes.cpp index cbe123452..d8bf56a31 100644 --- a/Engine/source/math/mathTypes.cpp +++ b/Engine/source/math/mathTypes.cpp @@ -514,6 +514,7 @@ ConsoleSetType( TypeBox3F ) U32 args = dSscanf(argv[0], "%g %g %g %g %g %g", &pDst->minExtents.x, &pDst->minExtents.y, &pDst->minExtents.z, &pDst->maxExtents.x, &pDst->maxExtents.y, &pDst->maxExtents.z); + TORQUE_UNUSED(args); AssertWarn(args == 6, "Warning, box probably not read properly"); } else diff --git a/Engine/source/platform/platformMemory.cpp b/Engine/source/platform/platformMemory.cpp index 925a15422..3ad831dc1 100644 --- a/Engine/source/platform/platformMemory.cpp +++ b/Engine/source/platform/platformMemory.cpp @@ -798,19 +798,17 @@ void checkPtr( void* ptr ) AllocatedHeader* header = ( AllocatedHeader* ) *iter; if( header->getUserPtr() == ptr ) { - char buffer[ 1024 ]; - #ifdef TORQUE_DEBUG_GUARD + char buffer[ 1024 ]; if( !checkGuard( *iter, true ) ) { dSprintf( buffer, sizeof( buffer ), "0x%x is a valid heap pointer but has its guards corrupted", ptr ); Platform::outputDebugString( buffer ); return; } -#endif - //dSprintf( buffer, sizeof( buffer ), "0x%x is a valid heap pointer", ptr ); //Platform::outputDebugString( buffer ); +#endif return; } } diff --git a/Engine/source/platform/platformNet.cpp b/Engine/source/platform/platformNet.cpp index 786fcf62d..d957949e2 100644 --- a/Engine/source/platform/platformNet.cpp +++ b/Engine/source/platform/platformNet.cpp @@ -27,7 +27,11 @@ #define TORQUE_USE_WINSOCK #include #include + +#ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS +#endif // EINPROGRESS + #define ioctl ioctlsocket typedef int socklen_t; diff --git a/Engine/source/platform/profiler.cpp b/Engine/source/platform/profiler.cpp index f97100f09..e68985b4f 100644 --- a/Engine/source/platform/profiler.cpp +++ b/Engine/source/platform/profiler.cpp @@ -623,6 +623,7 @@ void Profiler::dump() { FileStream fws; bool success = fws.open(mDumpFileName, Torque::FS::File::Write); + TORQUE_UNUSED(success); AssertFatal(success, "Cannot write profile dump to specified file!"); char buffer[1024]; diff --git a/Engine/source/scene/reflectionManager.cpp b/Engine/source/scene/reflectionManager.cpp index c6b78ad65..3fd24648a 100644 --- a/Engine/source/scene/reflectionManager.cpp +++ b/Engine/source/scene/reflectionManager.cpp @@ -189,11 +189,8 @@ void ReflectionManager::update( F32 timeSlice, break; } - U32 totalElapsed = mTimer->getElapsedMs(); - // Set metric/debug related script variables... - U32 numEnabled = mReflectors.size(); U32 numVisible = 0; U32 numOccluded = 0; @@ -208,6 +205,8 @@ void ReflectionManager::update( F32 timeSlice, } #ifdef TORQUE_GATHER_METRICS + U32 numEnabled = mReflectors.size(); + U32 totalElapsed = mTimer->getElapsedMs(); const GFXTextureProfileStats &stats = ReflectRenderTargetProfile.getStats(); F32 mb = ( stats.activeBytes / 1024.0f ) / 1024.0f; diff --git a/Engine/source/scene/zones/sceneZoneSpaceManager.cpp b/Engine/source/scene/zones/sceneZoneSpaceManager.cpp index ab0fa6ebe..8fd1f6963 100644 --- a/Engine/source/scene/zones/sceneZoneSpaceManager.cpp +++ b/Engine/source/scene/zones/sceneZoneSpaceManager.cpp @@ -901,6 +901,7 @@ void SceneZoneSpaceManager::verifyState() continue; SceneZoneSpace* otherSpace = mZoneSpaces[ n ]; + TORQUE_UNUSED(otherSpace); AssertFatal( otherSpace->getZoneRangeStart() >= zoneRangeStart + numZones || otherSpace->getZoneRangeStart() + otherSpace->getZoneRange() <= zoneRangeStart, "SceneZoneSpaceManager::verifyState - Overlap between zone ID ranges of zone spaces!" ); diff --git a/Engine/source/sfx/sfxWorld.h b/Engine/source/sfx/sfxWorld.h index 2806cc4c8..68309492b 100644 --- a/Engine/source/sfx/sfxWorld.h +++ b/Engine/source/sfx/sfxWorld.h @@ -303,6 +303,7 @@ void SFXWorld< NUM_DIMENSIONS, Object >::update() else { SFXAmbience* ambience = Deref( scope.mObject ).getAmbience(); + TORQUE_UNUSED(ambience); AssertFatal( ambience != NULL, "SFXWorld::update() - object on stack that does not have an ambient space!" ); // Listener is neither inside object nor in its diff --git a/Engine/source/ts/tsCollision.cpp b/Engine/source/ts/tsCollision.cpp index bb57bf1c5..2219f7c72 100644 --- a/Engine/source/ts/tsCollision.cpp +++ b/Engine/source/ts/tsCollision.cpp @@ -1512,6 +1512,7 @@ bool TSMesh::castRayOpcode( const Point3F &s, const Point3F &e, RayInfo *info, T // Do collision. bool safety = ray.Collide( vec, *mOptTree ); + TORQUE_UNUSED(safety); AssertFatal( safety, "TSMesh::castRayOpcode - no good ray collide!" ); // If no hit, just skip out. diff --git a/Engine/source/ts/tsShape.cpp b/Engine/source/ts/tsShape.cpp index 726efabff..4365aa9b1 100644 --- a/Engine/source/ts/tsShape.cpp +++ b/Engine/source/ts/tsShape.cpp @@ -390,6 +390,7 @@ void TSShape::getObjectDetails(S32 objIndex, Vector& objDetails) void TSShape::init() { S32 numSubShapes = subShapeFirstNode.size(); + TORQUE_UNUSED(numSubShapes); AssertFatal(numSubShapes==subShapeFirstObject.size(),"TSShape::init"); S32 i,j; diff --git a/Engine/source/ts/tsShapeAlloc.cpp b/Engine/source/ts/tsShapeAlloc.cpp index 8908b84cf..b9cb166dc 100644 --- a/Engine/source/ts/tsShapeAlloc.cpp +++ b/Engine/source/ts/tsShapeAlloc.cpp @@ -213,7 +213,9 @@ void TSShapeAlloc::checkGuard() bool check32 = checkGuard32(); bool check16 = checkGuard16(); bool check8 = checkGuard8(); - + TORQUE_UNUSED(check32); + TORQUE_UNUSED(check16); + TORQUE_UNUSED(check8); AssertFatal(check32,avar("TSShapeAlloc::checkGuard32: found %i, wanted %i",getSaveGuard32(),getPrevGuard32())); AssertFatal(check16,avar("TSShapeAlloc::checkGuard16: found %i, wanted %i",getSaveGuard16(),getPrevGuard16())); AssertFatal(check8 ,avar("TSShapeAlloc::checkGuard8: found %i, wanted %i",getSaveGuard8() ,getPrevGuard8())); diff --git a/Engine/source/ts/tsThread.cpp b/Engine/source/ts/tsThread.cpp index 7cb543c9e..1a8f8a3d5 100644 --- a/Engine/source/ts/tsThread.cpp +++ b/Engine/source/ts/tsThread.cpp @@ -163,6 +163,7 @@ void TSThread::setSequence(S32 seq, F32 toPos) { const TSShape * shape = mShapeInstance->mShape; + TORQUE_UNUSED(shape); AssertFatal(shape && shape->sequences.size()>seq && toPos>=0.0f && toPos<=1.0f, "TSThread::setSequence: invalid shape handle, sequence number, or position.");