From 48e7cf80a24a8d1d37b4aab93f167c4948b2a942 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Fri, 1 Jul 2016 12:51:06 +0200
Subject: [PATCH] cppcheck

style warnings
---
 src/colvar/PathMSDBase.cpp                | 3 +--
 src/crystallization/OrientationSphere.cpp | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/colvar/PathMSDBase.cpp b/src/colvar/PathMSDBase.cpp
index bc56ee1a0..6a7c6edfd 100644
--- a/src/colvar/PathMSDBase.cpp
+++ b/src/colvar/PathMSDBase.cpp
@@ -66,10 +66,9 @@ nframes(0)
          RMSD mymsd; 
          do_read=mypdb.readFromFilepointer(fp,plumed.getAtoms().usingNaturalUnits(),0.1/atoms.getUnits().getLength());
          if(do_read){
-            unsigned nat=0;
             nframes++;
             if(mypdb.getAtomNumbers().size()==0) error("number of atoms in a frame should be more than zero");
-            if(nat==0) nat=mypdb.getAtomNumbers().size();
+            unsigned nat=mypdb.getAtomNumbers().size();
             if(nat!=mypdb.getAtomNumbers().size()) error("frames should have the same number of atoms");
             if(aaa.empty()) aaa=mypdb.getAtomNumbers();
             if(aaa!=mypdb.getAtomNumbers()) error("frames should contain same atoms in same order");
diff --git a/src/crystallization/OrientationSphere.cpp b/src/crystallization/OrientationSphere.cpp
index a5229d6a6..393463214 100644
--- a/src/crystallization/OrientationSphere.cpp
+++ b/src/crystallization/OrientationSphere.cpp
@@ -67,7 +67,7 @@ MultiColvarFunction(ao)
 }
 
 double OrientationSphere::compute( const unsigned& tindex, multicolvar::AtomValuePack& myatoms ) const {
-   double d2, sw, value=0, denom=0, dot, f_dot, dot_df, dfunc; Vector ddistance;
+   double d2, sw, value=0, denom=0, dfunc; Vector ddistance;
    unsigned ncomponents=getBaseMultiColvar(0)->getNumberOfQuantities();
    std::vector<double> catom_orient( ncomponents ), this_orient( ncomponents );
    std::vector<double> this_der( ncomponents ), catom_der( ncomponents ); 
-- 
GitLab