fix unreachable code

This commit is contained in:
Erwin Coumans
2017-03-14 13:13:16 -07:00
parent 3b7c4d0947
commit 66919cc66a

View File

@@ -1715,17 +1715,11 @@ static PyObject* pybullet_getBodyInfo(PyObject* self, PyObject* args, PyObject*
PyTuple_SetItem(pyListJointInfo, 0, PyString_FromString(info.m_baseName)); PyTuple_SetItem(pyListJointInfo, 0, PyString_FromString(info.m_baseName));
return pyListJointInfo; return pyListJointInfo;
} }
else }
{ }
PyErr_SetString(SpamError, "Couldn't get body info"); PyErr_SetString(SpamError, "Couldn't get body info");
return NULL; return NULL;
} }
}
}
PyErr_SetString(SpamError, "error in getBodyInfo.");
return NULL;
}
static PyObject* pybullet_getConstraintInfo(PyObject* self, PyObject* args, PyObject* keywds) static PyObject* pybullet_getConstraintInfo(PyObject* self, PyObject* args, PyObject* keywds)
{ {
@@ -1800,15 +1794,10 @@ static PyObject* pybullet_getConstraintInfo(PyObject* self, PyObject* args, PyOb
return pyListConstraintInfo; return pyListConstraintInfo;
} }
else
{
PyErr_SetString(SpamError, "Couldn't get user constraint info");
return NULL;
}
} }
} }
PyErr_SetString(SpamError, "error in getConstraintInfo."); PyErr_SetString(SpamError, "Couldn't get user constraint info");
return NULL; return NULL;
} }
@@ -1908,13 +1897,11 @@ static PyObject* pybullet_resetJointState(PyObject* self, PyObject* args, PyObje
targetValue); targetValue);
statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle); statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle);
}
}
Py_INCREF(Py_None); Py_INCREF(Py_None);
return Py_None; return Py_None;
} }
}
PyErr_SetString(SpamError, "error in resetJointState.");
return NULL;
}
static PyObject* pybullet_resetBaseVelocity(PyObject* self, PyObject* args, PyObject* keywds) static PyObject* pybullet_resetBaseVelocity(PyObject* self, PyObject* args, PyObject* keywds)
{ {
@@ -2055,13 +2042,11 @@ static PyObject* pybullet_resetBasePositionAndOrientation(PyObject* self,
orn[2], orn[3]); orn[2], orn[3]);
statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle); statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle);
}
}
Py_INCREF(Py_None); Py_INCREF(Py_None);
return Py_None; return Py_None;
} }
}
PyErr_SetString(SpamError, "error in resetJointState.");
return NULL;
}
// Get the a single joint info for a specific bodyIndex // Get the a single joint info for a specific bodyIndex
// //