remove all warnings on Mac OSX Snow Leopard

This commit is contained in:
erwin.coumans
2010-01-30 22:31:56 +00:00
parent 77b773f470
commit 788f48643b
40 changed files with 136 additions and 244 deletions

View File

@@ -135,7 +135,7 @@ static int ClipSegmentToLine(ClipVertex vOut[2], ClipVertex vIn[2],
static btScalar EdgeSeparation(const btBox2dShape* poly1, const btTransform& xf1, int edge1,
const btBox2dShape* poly2, const btTransform& xf2)
{
int count1 = poly1->getVertexCount();
//int count1 = poly1->getVertexCount();
const btVector3* vertices1 = poly1->getVertices();
const btVector3* normals1 = poly1->getNormals();
@@ -271,7 +271,7 @@ static void FindIncidentEdge(ClipVertex c[2],
const btBox2dShape* poly1, const btTransform& xf1, int edge1,
const btBox2dShape* poly2, const btTransform& xf2)
{
int count1 = poly1->getVertexCount();
//int count1 = poly1->getVertexCount();
const btVector3* normals1 = poly1->getNormals();
int count2 = poly2->getVertexCount();

View File

@@ -30,8 +30,8 @@ btCollisionObject::btCollisionObject()
m_deactivationTime(btScalar(0.)),
m_friction(btScalar(0.5)),
m_restitution(btScalar(0.)),
m_userObjectPointer(0),
m_internalType(CO_COLLISION_OBJECT),
m_userObjectPointer(0),
m_hitFraction(btScalar(1.)),
m_ccdSweptSphereRadius(btScalar(0.)),
m_ccdMotionThreshold(btScalar(0.)),

View File

@@ -238,8 +238,8 @@ struct btPerturbedContactResult : public btManifoldResult
:m_originalManifoldResult(originalResult),
m_transformA(transformA),
m_transformB(transformB),
m_perturbA(perturbA),
m_unPerturbedTransform(unPerturbedTransform),
m_perturbA(perturbA),
m_debugDrawer(debugDrawer)
{
}

View File

@@ -461,16 +461,16 @@ void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject*
btVector3 center = (v0+v1+v2)*btScalar(1./3.);
btVector3 red(1,0,0), green(0,1,0),blue(0,0,1),white(1,1,1),black(0,0,0);
const btTransform& tr = colObj0->getWorldTransform();
btVector3 tri_normal;
tri_shape->calcNormal(tri_normal);
btScalar dot = tri_normal.dot(cp.m_normalWorldOnB);
//btScalar dot = tri_normal.dot(cp.m_normalWorldOnB);
btVector3 nearest;
btNearestPointInLineSegment(cp.m_localPointB,v0,v1,nearest);
btVector3 contact = cp.m_localPointB;
#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
const btTransform& tr = colObj0->getWorldTransform();
btDebugDrawLine(tr*nearest,tr*cp.m_localPointB,red);
#endif //BT_INTERNAL_EDGE_DEBUG_DRAW

View File

@@ -189,7 +189,7 @@ bool btConvexHullShape::isInside(const btVector3& ,btScalar ) const
///fills the dataBuffer and returns the struct name (and 0 on failure)
const char* btConvexHullShape::serialize(void* dataBuffer, btSerializer* serializer) const
{
int szc = sizeof(btConvexHullShapeData);
//int szc = sizeof(btConvexHullShapeData);
btConvexHullShapeData* shapeData = (btConvexHullShapeData*) dataBuffer;
btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData, serializer);
@@ -206,8 +206,8 @@ const char* btConvexHullShape::serialize(void* dataBuffer, btSerializer* seriali
if (numElem)
{
int sz = sizeof(btVector3Data);
int sz2 = sizeof(btVector3DoubleData);
int sz3 = sizeof(btVector3FloatData);
// int sz2 = sizeof(btVector3DoubleData);
// int sz3 = sizeof(btVector3FloatData);
btChunk* chunk = serializer->allocate(sz,numElem);
btVector3Data* memPtr = (btVector3Data*)chunk->m_oldPtr;
for (int i=0;i<numElem;i++,memPtr++)

View File

@@ -190,7 +190,7 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s
trimeshData->m_numMeshParts = getNumSubParts();
void* uniquePtr = 0;
//void* uniquePtr = 0;
trimeshData->m_meshPartsPtr = 0;
@@ -201,7 +201,7 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s
trimeshData->m_meshPartsPtr = memPtr;
int numtotalphysicsverts = 0;
// int numtotalphysicsverts = 0;
int part,graphicssubparts = getNumSubParts();
const unsigned char * vertexbase;
const unsigned char * indexbase;
@@ -210,7 +210,7 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s
PHY_ScalarType gfxindextype;
int stride,numverts,numtriangles;
int gfxindex;
btVector3 triangle[3];
// btVector3 triangle[3];
btVector3 meshScaling = getScaling();

View File

@@ -56,9 +56,9 @@ m_useSolveConstraintObsolete(D6_USE_OBSOLETE_METHOD)
static btRigidBody s_fixed(0, 0, 0);
btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB)
: btTypedConstraint(D6_CONSTRAINT_TYPE, s_fixed, rbB),
m_useSolveConstraintObsolete(false),
m_frameInB(frameInB),
m_useLinearReferenceFrameA(useLinearReferenceFrameB)
m_useLinearReferenceFrameA(useLinearReferenceFrameB),
m_useSolveConstraintObsolete(false)
{
///not providing rigidbody A means implicitly using worldspace for body A
m_frameInA = rbB.getCenterOfMassTransform() * m_frameInB;

View File

@@ -713,8 +713,8 @@ class btClosestNotMeConvexResultCallback : public btCollisionWorld::ClosestConve
public:
btClosestNotMeConvexResultCallback (btCollisionObject* me,const btVector3& fromA,const btVector3& toA,btOverlappingPairCache* pairCache,btDispatcher* dispatcher) :
btCollisionWorld::ClosestConvexResultCallback(fromA,toA),
m_allowedPenetration(0.0f),
m_me(me),
m_allowedPenetration(0.0f),
m_pairCache(pairCache),
m_dispatcher(dispatcher)
{

View File

@@ -70,7 +70,7 @@ void processMiniCLTask(void* userPtr, void* lsMemory)
{
// BT_PROFILE("processSampleTask");
MiniCLTask_LocalStoreMemory* localMemory = (MiniCLTask_LocalStoreMemory*)lsMemory;
//MiniCLTask_LocalStoreMemory* localMemory = (MiniCLTask_LocalStoreMemory*)lsMemory;
MiniCLTaskDesc* taskDescPtr = (MiniCLTaskDesc*)userPtr;
MiniCLTaskDesc& taskDesc = *taskDescPtr;

View File

@@ -172,7 +172,7 @@ void PosixThreadSupport::waitForResponse(unsigned int *puiArgument0, unsigned in
// get at least one thread which has finished
size_t last = -1;
for(size_t t=0; t < m_activeSpuStatus.size(); ++t) {
for(size_t t=0; t < size_t(m_activeSpuStatus.size()); ++t) {
if(2 == m_activeSpuStatus[t].m_status) {
last = t;
break;
@@ -233,9 +233,9 @@ void PosixThreadSupport::startSPU()
///tell the task scheduler we are done with the SPU tasks
void PosixThreadSupport::stopSPU()
{
for(size_t t=0; t < m_activeSpuStatus.size(); ++t) {
for(size_t t=0; t < size_t(m_activeSpuStatus.size()); ++t) {
btSpuStatus& spuStatus = m_activeSpuStatus[t];
printf("%s: Thread %i used: %ld\n", __FUNCTION__, t, spuStatus.threadUsed);
printf("%s: Thread %i used: %ld\n", __FUNCTION__, int(t), spuStatus.threadUsed);
destroySem(spuStatus.startSemaphore);
checkPThreadFunction(pthread_cancel(spuStatus.thread));

View File

@@ -26,7 +26,7 @@ subject to the following restrictions:
void SpuCollisionTaskProcess::setNumTasks(int maxNumTasks)
{
if (m_maxNumOutstandingTasks != maxNumTasks)
if (int(m_maxNumOutstandingTasks) != maxNumTasks)
{
m_maxNumOutstandingTasks = maxNumTasks;
m_taskBusy.resize(m_maxNumOutstandingTasks);
@@ -69,7 +69,7 @@ m_maxNumOutstandingTasks(0)
m_threadInterface->startSPU();
//printf("sizeof vec_float4: %d\n", sizeof(vec_float4));
printf("sizeof SpuGatherAndProcessWorkUnitInput: %d\n", sizeof(SpuGatherAndProcessWorkUnitInput));
printf("sizeof SpuGatherAndProcessWorkUnitInput: %d\n", int(sizeof(SpuGatherAndProcessWorkUnitInput)));
}

View File

@@ -1033,7 +1033,7 @@ void processCollisionTask(void* userPtr, void* lsMemPtr)
collisionPairInput.m_isSwapped);
float distance=0.f;
//float distance=0.f;
btVector3 normalInB;

View File

@@ -2327,7 +2327,7 @@ void btSoftBody::solveClusters(btScalar sor)
void btSoftBody::applyClusters(bool drift)
{
BT_PROFILE("ApplyClusters");
const btScalar f0=m_sst.sdt;
// const btScalar f0=m_sst.sdt;
//const btScalar f1=f0/2;
btAlignedObjectArray<btVector3> deltas;
btAlignedObjectArray<btScalar> weights;
@@ -2625,6 +2625,9 @@ void btSoftBody::applyForces()
nrm=NormalizeAny(rel_v);break;
case btSoftBody::eAeroModel::V_TwoSided:
nrm*=(btScalar)(btDot(nrm,rel_v)<0?-1:+1);break;
default:
{
}
}
const btScalar dvn=btDot(rel_v,nrm);
/* Compute forces */
@@ -2671,6 +2674,9 @@ void btSoftBody::applyForces()
{
case btSoftBody::eAeroModel::F_TwoSided:
nrm*=(btScalar)(btDot(nrm,rel_v)<0?-1:+1);break;
default:
{
}
}
const btScalar dvn=btDot(rel_v,nrm);
/* Compute forces */
@@ -2815,6 +2821,9 @@ btSoftBody::psolver_t btSoftBody::getSolver(ePSolver::_ solver)
return(&btSoftBody::PSolve_RContacts);
case ePSolver::SContacts:
return(&btSoftBody::PSolve_SContacts);
default:
{
}
}
return(0);
}
@@ -2825,6 +2834,9 @@ btSoftBody::vsolver_t btSoftBody::getSolver(eVSolver::_ solver)
switch(solver)
{
case eVSolver::Linear: return(&btSoftBody::VSolve_Links);
default:
{
}
}
return(0);
}

View File

@@ -380,7 +380,12 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb,
idraw->drawLine(o0,o0+a1*10,btVector3(1,1,0));
idraw->drawLine(o1,o1+a0*10,btVector3(0,1,1));
idraw->drawLine(o1,o1+a1*10,btVector3(0,1,1));
break;
}
default:
{
}
}
}
}

View File

@@ -1156,7 +1156,7 @@ void HullLibrary::BringOutYourDead(const btVector3* verts,unsigned int vcount, b
for (int k=0;k<m_vertexIndexMapping.size();k++)
{
if (tmpIndices[k]==v)
if (tmpIndices[k]==int(v))
m_vertexIndexMapping[k]=ocount;
}

View File

@@ -1,6 +1,6 @@
/*
/***************************************************************************************************
***************************************************************************************************
**
** profile.cpp
**

View File

@@ -180,7 +180,7 @@ protected:
}
{
nr= (long)cp;
long mask=3;
// long mask=3;
nr= ((nr+3)&~3)-nr;
while (nr--)
{
@@ -214,7 +214,7 @@ protected:
{
nr= (long)cp;
long mask=3;
// long mask=3;
nr= ((nr+3)&~3)-nr;
while (nr--)
{