fix clang warnings in some 3rd party libs

This commit is contained in:
wmayer
2017-09-24 12:22:53 +02:00
parent 0d03ad13da
commit b2fac5929b
4 changed files with 9 additions and 6 deletions

View File

@@ -367,11 +367,13 @@ bool
TGaussInfo::TLess
::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const
{
if(!&theLeft)
return true;
//clang: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code;
// pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
//if(!&theLeft)
// return true;
if(!&theRight)
return false;
//if(!&theRight)
// return false;
if(theLeft.myGeom != theRight.myGeom)
return theLeft.myGeom < theRight.myGeom;

View File

@@ -27,7 +27,7 @@ namespace KDL {
ChainDynParam::ChainDynParam(const Chain& _chain, Vector _grav):
chain(_chain),
nr(0),
//nr(0),
nj(chain.getNrOfJoints()),
ns(chain.getNrOfSegments()),
grav(_grav),

View File

@@ -55,7 +55,7 @@ namespace KDL {
private:
const Chain chain;
int nr;
//int nr;
unsigned int nj;
unsigned int ns;
Vector grav;

View File

@@ -156,6 +156,7 @@ namespace KDL {
Vector Joint::JointOrigin() const
{
(void)inertia; (void)damping; (void)stiffness;
return origin;
}