From 2a754639594a94de64080795b6cb72b942911101 Mon Sep 17 00:00:00 2001 From: Greg Landrum Date: Sat, 14 Nov 2015 09:21:05 +0100 Subject: [PATCH] get rid of some more warnings --- Code/DataStructs/ExplicitBitVect.cpp | 2 +- Code/DataStructs/SparseBitVect.h | 2 +- Code/DataStructs/SparseIntVect.h | 4 ++-- Code/DistGeom/DistGeomUtils.cpp | 2 ++ Code/Geometry/UniformGrid3D.cpp | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Code/DataStructs/ExplicitBitVect.cpp b/Code/DataStructs/ExplicitBitVect.cpp index bbccc2a6d..2d10fb291 100644 --- a/Code/DataStructs/ExplicitBitVect.cpp +++ b/Code/DataStructs/ExplicitBitVect.cpp @@ -41,7 +41,7 @@ ExplicitBitVect::ExplicitBitVect(const char *data,const unsigned int dataLen) initFromText(data,dataLen); } - ExplicitBitVect::ExplicitBitVect(const ExplicitBitVect& other){ + ExplicitBitVect::ExplicitBitVect(const ExplicitBitVect& other) : BitVect(other) { d_size = other.d_size; dp_bits = new boost::dynamic_bitset<>(*(other.dp_bits)); d_numOnBits=other.d_numOnBits; diff --git a/Code/DataStructs/SparseBitVect.h b/Code/DataStructs/SparseBitVect.h index 45bd5461b..38acb7ef4 100644 --- a/Code/DataStructs/SparseBitVect.h +++ b/Code/DataStructs/SparseBitVect.h @@ -39,7 +39,7 @@ public: explicit SparseBitVect(unsigned int size): dp_bits(0), d_size(0) {_initForSize(size); }; //! copy constructor - SparseBitVect(const SparseBitVect& other){ + SparseBitVect(const SparseBitVect& other) : BitVect(other) { d_size=0;dp_bits = 0; _initForSize(other.getNumBits()); IntSet *bv=other.dp_bits; diff --git a/Code/DataStructs/SparseIntVect.h b/Code/DataStructs/SparseIntVect.h index b1d1878e7..94fff594d 100644 --- a/Code/DataStructs/SparseIntVect.h +++ b/Code/DataStructs/SparseIntVect.h @@ -75,7 +75,7 @@ namespace RDKit{ //! set the value at an index void setVal(IndexType idx, int val){ - if(idx<0||idx>=d_length){ + if(idx>=d_length){ throw IndexErrorException(static_cast(idx)); } if(val!=0){ @@ -86,7 +86,7 @@ namespace RDKit{ }; #ifdef __clang__ #pragma clang diagnostic pop -#elif defined(__GNUC__) || defined(__GNUG__) && \ +#elif ( defined(__GNUC__) || defined(__GNUG__) ) && \ ( __GNUC__ > 4 || \ (__GNUC__ == 4 && __GNUC_MINOR__ > 1 ) ) #pragma GCC diagnostic pop diff --git a/Code/DistGeom/DistGeomUtils.cpp b/Code/DistGeom/DistGeomUtils.cpp index 498c88d29..0b742c0a8 100644 --- a/Code/DistGeom/DistGeomUtils.cpp +++ b/Code/DistGeom/DistGeomUtils.cpp @@ -252,6 +252,7 @@ namespace DistGeom { const std::vector, std::vector > > &expTorsionAngles, const std::vector > &improperAtoms, const std::vector &atomNums) { + (void)atomNums; unsigned int N = mmat.numRows(); CHECK_INVARIANT(N == positions.size(), ""); CHECK_INVARIANT(expTorsionAtoms.size() == expTorsionAngles.size(), ""); @@ -377,6 +378,7 @@ namespace DistGeom { const std::vector > &expTorsionAtoms, const std::vector, std::vector > > &expTorsionAngles, const std::vector &atomNums) { + (void)atomNums; unsigned int N = mmat.numRows(); CHECK_INVARIANT(N == positions.size(), ""); CHECK_INVARIANT(expTorsionAtoms.size() == expTorsionAngles.size(), ""); diff --git a/Code/Geometry/UniformGrid3D.cpp b/Code/Geometry/UniformGrid3D.cpp index 57b8cfcd8..5ae3e7a6a 100644 --- a/Code/Geometry/UniformGrid3D.cpp +++ b/Code/Geometry/UniformGrid3D.cpp @@ -23,7 +23,7 @@ using namespace RDKit; namespace RDGeom { unsigned int ci_GRIDPICKLE_VERSION=0x1; - UniformGrid3D::UniformGrid3D(const UniformGrid3D &other){ + UniformGrid3D::UniformGrid3D(const UniformGrid3D &other) : Grid3D(other) { PRECONDITION(other.dp_storage,"cannot copy an unintialized grid"); RDKit::DiscreteValueVect *data=new RDKit::DiscreteValueVect(*other.dp_storage); initGrid(other.d_numX*other.d_spacing,