Merge pull request #1736 from erwincoumans/master

remove some warnings
This commit is contained in:
erwincoumans
2018-06-06 19:22:19 -07:00
committed by GitHub
5 changed files with 10 additions and 11 deletions

View File

@@ -96,7 +96,6 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i
int udpPort = 1234; int udpPort = 1234;
int tcpPort = 6667; int tcpPort = 6667;
int key = SHARED_MEMORY_KEY; int key = SHARED_MEMORY_KEY;
bool connected = false;
switch (mode) switch (mode)
{ {

View File

@@ -242,7 +242,6 @@ void PhysicsClientSharedMemory::resetData()
BodyJointInfoCache** bodyJointsPtr = m_data->m_bodyJointMap.getAtIndex(i); BodyJointInfoCache** bodyJointsPtr = m_data->m_bodyJointMap.getAtIndex(i);
if (bodyJointsPtr && *bodyJointsPtr) if (bodyJointsPtr && *bodyJointsPtr)
{ {
BodyJointInfoCache* bodyJoints = *bodyJointsPtr;
delete (*bodyJointsPtr); delete (*bodyJointsPtr);
} }
} }

View File

@@ -444,7 +444,7 @@ void b3RobotSimulatorClientAPI_NoDirect::setRealTimeSimulation(bool enableRealTi
b3SharedMemoryCommandHandle command = b3InitPhysicsParamCommand(m_data->m_physicsClientHandle); b3SharedMemoryCommandHandle command = b3InitPhysicsParamCommand(m_data->m_physicsClientHandle);
b3SharedMemoryStatusHandle statusHandle; b3SharedMemoryStatusHandle statusHandle;
int ret = b3PhysicsParamSetRealTimeSimulation(command, enableRealTimeSimulation); b3PhysicsParamSetRealTimeSimulation(command, enableRealTimeSimulation);
statusHandle = b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, command); statusHandle = b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, command);
@@ -531,7 +531,7 @@ void b3RobotSimulatorClientAPI_NoDirect::removeConstraint(int constraintId)
} }
b3SharedMemoryCommandHandle commandHandle = b3InitRemoveUserConstraintCommand(m_data->m_physicsClientHandle, constraintId); b3SharedMemoryCommandHandle commandHandle = b3InitRemoveUserConstraintCommand(m_data->m_physicsClientHandle, constraintId);
b3SharedMemoryStatusHandle statusHandle = b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, commandHandle); b3SharedMemoryStatusHandle statusHandle = b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, commandHandle);
int statusType = b3GetStatusType(statusHandle); b3GetStatusType(statusHandle);
} }
@@ -1094,7 +1094,7 @@ bool b3RobotSimulatorClientAPI_NoDirect::calculateInverseDynamics(int bodyUnique
return false; return false;
} }
int numJoints = b3GetNumJoints(m_data->m_physicsClientHandle, bodyUniqueId); b3GetNumJoints(m_data->m_physicsClientHandle, bodyUniqueId);
b3SharedMemoryStatusHandle statusHandle; b3SharedMemoryStatusHandle statusHandle;
int statusType; int statusType;
b3SharedMemoryCommandHandle commandHandle = b3CalculateInverseDynamicsCommandInit(m_data->m_physicsClientHandle, bodyUniqueId, jointPositions, b3SharedMemoryCommandHandle commandHandle = b3CalculateInverseDynamicsCommandInit(m_data->m_physicsClientHandle, bodyUniqueId, jointPositions,
@@ -1404,7 +1404,7 @@ bool b3RobotSimulatorClientAPI_NoDirect::setJointMotorControlArray(int bodyUniqu
b3Warning("Not connected to physics server."); b3Warning("Not connected to physics server.");
return false; return false;
} }
int numJoints = b3GetNumJoints(sm, bodyUniqueId); b3GetNumJoints(sm, bodyUniqueId);
b3SharedMemoryCommandHandle commandHandle; b3SharedMemoryCommandHandle commandHandle;
b3SharedMemoryStatusHandle statusHandle; b3SharedMemoryStatusHandle statusHandle;

View File

@@ -388,9 +388,10 @@ struct b3RobotSimulatorCreateMultiBodyArgs
int m_useMaximalCoordinates; int m_useMaximalCoordinates;
b3RobotSimulatorCreateMultiBodyArgs() b3RobotSimulatorCreateMultiBodyArgs()
: m_numLinks(0), m_baseMass(0), m_baseCollisionShapeIndex(-1), m_baseVisualShapeIndex(-1), m_useMaximalCoordinates(0), : m_baseMass(0), m_baseCollisionShapeIndex(-1), m_baseVisualShapeIndex(-1),
m_linkMasses(NULL), m_numLinks(0),
m_linkCollisionShapeIndices(NULL), m_linkMasses(NULL),
m_linkCollisionShapeIndices(NULL),
m_linkVisualShapeIndices(NULL), m_linkVisualShapeIndices(NULL),
m_linkPositions(NULL), m_linkPositions(NULL),
m_linkOrientations(NULL), m_linkOrientations(NULL),
@@ -398,7 +399,8 @@ struct b3RobotSimulatorCreateMultiBodyArgs
m_linkInertialFrameOrientations(NULL), m_linkInertialFrameOrientations(NULL),
m_linkParentIndices(NULL), m_linkParentIndices(NULL),
m_linkJointTypes(NULL), m_linkJointTypes(NULL),
m_linkJointAxes(NULL) m_linkJointAxes(NULL),
m_useMaximalCoordinates(0)
{ {
m_basePosition.setValue(0,0,0); m_basePosition.setValue(0,0,0);
m_baseOrientation.setValue(0,0,0,1); m_baseOrientation.setValue(0,0,0,1);

View File

@@ -40,7 +40,6 @@ bool b3RobotSimulatorClientAPI_NoGUI::connect(int mode, const std::string& hostN
int udpPort = 1234; int udpPort = 1234;
int tcpPort = 6667; int tcpPort = 6667;
int key = SHARED_MEMORY_KEY; int key = SHARED_MEMORY_KEY;
bool connected = false;
switch (mode) switch (mode)
{ {