fix some warnings, see Issue 400

This commit is contained in:
erwin.coumans 2010-07-20 01:09:34 +00:00
parent f5e6f87427
commit 745b3d4e05
8 changed files with 13 additions and 13 deletions

View File

@ -446,7 +446,7 @@ char* btBulletWorldImporter::duplicateName(const char* name)
{
if (name)
{
int l = strlen(name);
int l = (int)strlen(name);
char* newName = new char[l+1];
memcpy(newName,name,l);
newName[l] = 0;

View File

@ -160,7 +160,7 @@ public:
return 0;
}
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0,btDispatcher* dispatcher)
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* /*proxy0*/,btDispatcher* /*dispatcher*/)
{
btAssert(0);
//need to keep track of all ghost objects and call them here

View File

@ -59,12 +59,12 @@ ATTRIBUTE_ALIGNED64 (struct) btSolverConstraint
union
{
btRigidBody* m_solverBodyA;
btScalar m_companionIdA;
int m_companionIdA;
};
union
{
btRigidBody* m_solverBodyB;
btScalar m_companionIdB;
int m_companionIdB;
};
union

View File

@ -151,7 +151,7 @@ public:
}
///internal method used by the constraint solver, don't use them directly
virtual void solveConstraintObsolete(btRigidBody& bodyA,btRigidBody& bodyB,btScalar timeStep) {};
virtual void solveConstraintObsolete(btRigidBody& /*bodyA*/,btRigidBody& /*bodyB*/,btScalar /*timeStep*/) {};
const btRigidBody& getRigidBodyA() const

View File

@ -100,7 +100,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo(
{
char deviceName[] = "CPU";
unsigned int nameLen = strlen(deviceName)+1;
assert(param_value_size>strlen(deviceName));
btAssert(param_value_size>strlen(deviceName));
if (nameLen < param_value_size)
{
const char* cpuName = "CPU";

View File

@ -5,7 +5,7 @@
#include "LinearMath/btScalar.h"
#include "LinearMath/btMinMax.h"
#include <vectormath_aos.h>
#include "vectormath_aos.h"
typedef Vectormath::Aos::Vector3 vmVector3;
typedef Vectormath::Aos::Quat vmQuat;
typedef Vectormath::Aos::Matrix3 vmMatrix3;

View File

@ -173,7 +173,7 @@ void CustomSolveConstraintsTaskParallel(
uint32_t numPairs = jointParallelGroup->numPairs[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
if(batchId%numTasks == taskId && numPairs > 0) {
const PfxParallelBatch &batch = jointParallelBatches[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
for(int i=0;i<numPairs;i++) {
for(uint32_t i=0;i<numPairs;i++) {
PfxConstraintPair &pair = jointPairs[batch.pairIndices[i]];
uint16_t iA = pfxGetRigidBodyIdA(pair);
uint16_t iB = pfxGetRigidBodyIdB(pair);
@ -208,7 +208,7 @@ void CustomSolveConstraintsTaskParallel(
uint32_t numPairs = contactParallelGroup->numPairs[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
if(batchId%numTasks == taskId && numPairs > 0) {
const PfxParallelBatch &batch = contactParallelBatches[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
for(int i=0;i<numPairs;i++) {
for(uint32_t i=0;i<numPairs;i++) {
PfxConstraintPair &pair = contactPairs[batch.pairIndices[i]];
uint16_t iA = pfxGetRigidBodyIdA(pair);
uint16_t iB = pfxGetRigidBodyIdB(pair);
@ -263,7 +263,7 @@ void CustomPostSolverTask(
PfxSolverBody *solverBodies,
uint32_t numRigidBodies)
{
for(int i=0;i<numRigidBodies;i++) {
for(uint32_t i=0;i<numRigidBodies;i++) {
TrbState &state = states[i];
PfxSolverBody &solverBody = solverBodies[i];
state.setLinearVelocity(state.getLinearVelocity()+solverBody.mDeltaLinearVelocity);
@ -400,7 +400,7 @@ void CustomSetupContactConstraintsTask(
float separateBias,
float timeStep)
{
for(int i=0;i<numContactPairs;i++) {
for(uint32_t i=0;i<numContactPairs;i++) {
PfxConstraintPair &pair = contactPairs[i];
if(!pfxGetActive(pair) || pfxGetNumConstraints(pair) == 0 ||
((pfxGetMotionMaskA(pair)&PFX_MOTION_MASK_STATIC) && (pfxGetMotionMaskB(pair)&PFX_MOTION_MASK_STATIC)) ) {
@ -864,7 +864,7 @@ void BPE_customConstraintSolverSequentialNew(unsigned int new_num, PfxBroadphase
{
BT_PROFILE("pfxSetupConstraints");
for(int i=0;i<numJoints;i++) {
for(uint32_t i=0;i<numJoints;i++) {
// <20>î•ñÌ<E2809A>X<EFBFBD>V
PfxConstraintPair &pair = jointPairs[i];
int idA = pfxGetRigidBodyIdA(pair);

View File

@ -211,7 +211,7 @@ protected:
btAlignedObjectArray<Value> m_valueArray;
btAlignedObjectArray<Key> m_keyArray;
void growTables(const Key& key)
void growTables(const Key& /*key*/)
{
int newCapacity = m_valueArray.capacity();