From 3d10338ed5c9440bbc856e9d9c8ee12e072a7f8f Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 10 Sep 2015 17:52:41 -0700 Subject: [PATCH] fix warnings (thanks to Aaron!) --- Extras/Serialize/BulletFileLoader/bFile.cpp | 2 +- examples/OpenGLWindow/GLInstancingRenderer.cpp | 8 ++++---- examples/ThirdPartyLibs/Gwen/BaseRender.h | 1 - .../BroadphaseCollision/btOverlappingPairCache.cpp | 1 - .../BroadphaseCollision/btOverlappingPairCache.h | 1 - .../CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp | 8 ++------ .../CollisionDispatch/btConvex2dConvex2dAlgorithm.h | 3 --- .../CollisionDispatch/btHashedSimplePairCache.cpp | 4 +--- .../CollisionDispatch/btHashedSimplePairCache.h | 4 +--- .../CollisionShapes/btBvhTriangleMeshShape.h | 4 ++++ .../CollisionShapes/btConvexPolyhedron.cpp | 3 ++- .../CollisionShapes/btMultimaterialTriangleMeshShape.h | 1 - src/BulletDynamics/Vehicle/btRaycastVehicle.h | 2 -- 13 files changed, 15 insertions(+), 27 deletions(-) diff --git a/Extras/Serialize/BulletFileLoader/bFile.cpp b/Extras/Serialize/BulletFileLoader/bFile.cpp index b8979ff48..469ee6715 100644 --- a/Extras/Serialize/BulletFileLoader/bFile.cpp +++ b/Extras/Serialize/BulletFileLoader/bFile.cpp @@ -1224,7 +1224,7 @@ void bFile::resolvePointersMismatch() int p = 0; while (blockLen-- > 0) { - btPointerUid dp = {0}; + btPointerUid dp = {{0}}; safeSwapPtr((char*)dp.m_uniqueIds, oldPtr); void **tptr = (void**)(newPtr + p * ptrMem); diff --git a/examples/OpenGLWindow/GLInstancingRenderer.cpp b/examples/OpenGLWindow/GLInstancingRenderer.cpp index 32118c56a..5798c75ba 100644 --- a/examples/OpenGLWindow/GLInstancingRenderer.cpp +++ b/examples/OpenGLWindow/GLInstancingRenderer.cpp @@ -1409,10 +1409,10 @@ void GLInstancingRenderer::renderSceneInternal(int renderMode) b3Matrix4x4Mul(depthProjectionMatrix,depthModelViewMatrix,depthMVP); GLfloat biasMatrix[4][4]={ - 0.5, 0.0, 0.0, 0.0, - 0.0, 0.5, 0.0, 0.0, - 0.0, 0.0, 0.5, 0.0, - 0.5, 0.5, 0.5, 1.0 + { 0.5, 0.0, 0.0, 0.0 }, + { 0.0, 0.5, 0.0, 0.0 }, + { 0.0, 0.0, 0.5, 0.0 }, + { 0.5, 0.5, 0.5, 1.0 } }; GLfloat depthBiasMVP[4][4]; diff --git a/examples/ThirdPartyLibs/Gwen/BaseRender.h b/examples/ThirdPartyLibs/Gwen/BaseRender.h index 80daaa375..283c93189 100644 --- a/examples/ThirdPartyLibs/Gwen/BaseRender.h +++ b/examples/ThirdPartyLibs/Gwen/BaseRender.h @@ -106,7 +106,6 @@ namespace Gwen private: Gwen::Rect m_rectClipRegion; - ICacheToTexture* m_RTT; public: diff --git a/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp b/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp index ae22dadc7..ad69fcbd7 100644 --- a/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp +++ b/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp @@ -34,7 +34,6 @@ int gFindPairs =0; btHashedOverlappingPairCache::btHashedOverlappingPairCache(): m_overlapFilterCallback(0), - m_blockedForChanges(false), m_ghostPairCallback(0) { int initialAllocatedSize= 2; diff --git a/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h index eee90e473..146142704 100644 --- a/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +++ b/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h @@ -94,7 +94,6 @@ class btHashedOverlappingPairCache : public btOverlappingPairCache { btBroadphasePairArray m_overlappingPairArray; btOverlapFilterCallback* m_overlapFilterCallback; - bool m_blockedForChanges; protected: diff --git a/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp b/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp index 4ec9ae713..1cb3d2e7a 100644 --- a/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp +++ b/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp @@ -47,8 +47,6 @@ subject to the following restrictions: btConvex2dConvex2dAlgorithm::CreateFunc::CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) { - m_numPerturbationIterations = 0; - m_minimumPointsPerturbationThreshold = 3; m_simplexSolver = simplexSolver; m_pdSolver = pdSolver; } @@ -57,15 +55,13 @@ btConvex2dConvex2dAlgorithm::CreateFunc::~CreateFunc() { } -btConvex2dConvex2dAlgorithm::btConvex2dConvex2dAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver,int numPerturbationIterations, int minimumPointsPerturbationThreshold) +btConvex2dConvex2dAlgorithm::btConvex2dConvex2dAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver,int /* numPerturbationIterations */, int /* minimumPointsPerturbationThreshold */) : btActivatingCollisionAlgorithm(ci,body0Wrap,body1Wrap), m_simplexSolver(simplexSolver), m_pdSolver(pdSolver), m_ownManifold (false), m_manifoldPtr(mf), -m_lowLevelOfDetail(false), - m_numPerturbationIterations(numPerturbationIterations), -m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold) +m_lowLevelOfDetail(false) { (void)body0Wrap; (void)body1Wrap; diff --git a/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h b/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h index 18d9385a1..24d133677 100644 --- a/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h +++ b/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h @@ -40,9 +40,6 @@ class btConvex2dConvex2dAlgorithm : public btActivatingCollisionAlgorithm btPersistentManifold* m_manifoldPtr; bool m_lowLevelOfDetail; - int m_numPerturbationIterations; - int m_minimumPointsPerturbationThreshold; - public: btConvex2dConvex2dAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold); diff --git a/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp b/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp index cfcca5654..8c8a7c3c1 100644 --- a/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp +++ b/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp @@ -28,9 +28,7 @@ int gFindSimplePairs =0; -btHashedSimplePairCache::btHashedSimplePairCache(): - m_blockedForChanges(false) -{ +btHashedSimplePairCache::btHashedSimplePairCache() { int initialAllocatedSize= 2; m_overlappingPairArray.reserve(initialAllocatedSize); growTables(); diff --git a/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h b/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h index e88ef97e9..186964d72 100644 --- a/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h +++ b/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h @@ -55,9 +55,7 @@ extern int gFindSimplePairs; class btHashedSimplePairCache { btSimplePairArray m_overlappingPairArray; - - bool m_blockedForChanges; - + protected: diff --git a/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h index 493d63553..1fa4995d1 100644 --- a/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h @@ -39,7 +39,11 @@ ATTRIBUTE_ALIGNED16(class) btBvhTriangleMeshShape : public btTriangleMeshShape bool m_useQuantizedAabbCompression; bool m_ownsBvh; +#ifdef __clang__ + bool m_pad[11] __attribute__((unused));////need padding due to alignment +#else bool m_pad[11];////need padding due to alignment +#endif public: diff --git a/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp b/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp index f4324c1f4..4f45319a8 100644 --- a/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp +++ b/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp @@ -21,6 +21,7 @@ subject to the following restrictions: #include "btConvexPolyhedron.h" #include "LinearMath/btHashMap.h" + btConvexPolyhedron::btConvexPolyhedron() { @@ -33,7 +34,7 @@ btConvexPolyhedron::~btConvexPolyhedron() inline bool IsAlmostZero(const btVector3& v) { - if(fabsf(v.x())>1e-6 || fabsf(v.y())>1e-6 || fabsf(v.z())>1e-6) return false; + if(btFabs(v.x())>1e-6 || btFabs(v.y())>1e-6 || btFabs(v.z())>1e-6) return false; return true; } diff --git a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h index 2b92ab7d1..5ebaede4a 100644 --- a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h @@ -25,7 +25,6 @@ subject to the following restrictions: ATTRIBUTE_ALIGNED16(class) btMultimaterialTriangleMeshShape : public btBvhTriangleMeshShape { btAlignedObjectArray m_materialList; - int ** m_triangleMaterials; public: diff --git a/src/BulletDynamics/Vehicle/btRaycastVehicle.h b/src/BulletDynamics/Vehicle/btRaycastVehicle.h index f59555f94..82d44c73e 100644 --- a/src/BulletDynamics/Vehicle/btRaycastVehicle.h +++ b/src/BulletDynamics/Vehicle/btRaycastVehicle.h @@ -58,8 +58,6 @@ public: }; private: - btScalar m_tau; - btScalar m_damping; btVehicleRaycaster* m_vehicleRaycaster; btScalar m_pitchControl; btScalar m_steeringValue;