From ea2dc469c83a3fefbf8550e206f7cc07d355824a Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Mon, 4 Apr 2016 10:27:50 +0200
Subject: [PATCH] fixed warnings

---
 src/adjmat/ClusterDiameter.cpp            | 2 +-
 src/crystallization/OrientationSphere.cpp | 1 -
 src/mapping/Mapping.cpp                   | 2 +-
 src/vesselbase/ActionWithVessel.cpp       | 2 +-
 src/vesselbase/StoreDataVessel.cpp        | 4 ++--
 5 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/adjmat/ClusterDiameter.cpp b/src/adjmat/ClusterDiameter.cpp
index 24539a644..356a824ff 100644
--- a/src/adjmat/ClusterDiameter.cpp
+++ b/src/adjmat/ClusterDiameter.cpp
@@ -96,7 +96,7 @@ void ClusterDiameter::calculate(){
 void ClusterDiameter::performTask( const unsigned& task_index, const unsigned& current, MultiValue& myvals ) const { 
   unsigned iatom=std::floor(current/getNumberOfNodes()), jatom = current - iatom*getNumberOfNodes();
   Vector distance=getSeparation( getPosition(iatom), getPosition(jatom) );
-  double dd = distance.modulo(), inv = 1.0/dd ; 
+  double dd = distance.modulo();
   myvals.setValue( 0, 1.0 ); myvals.setValue( 1, dd ); 
 }
 
diff --git a/src/crystallization/OrientationSphere.cpp b/src/crystallization/OrientationSphere.cpp
index 8d311203e..b49bd690a 100644
--- a/src/crystallization/OrientationSphere.cpp
+++ b/src/crystallization/OrientationSphere.cpp
@@ -72,7 +72,6 @@ double OrientationSphere::compute( const unsigned& tindex, multicolvar::AtomValu
    unsigned ncomponents=getBaseMultiColvar(0)->getNumberOfQuantities();
    std::vector<double> catom_orient( ncomponents ), this_orient( ncomponents ), catom_der( ncomponents ); 
 
-   Vector catom_pos = myatoms.getPosition(0);
    getVectorForTask( myatoms.getIndex(0), true, catom_orient ); 
    multicolvar::CatomPack atom0; 
    MultiValue& myder0=getVectorDerivatives( myatoms.getIndex(0), true ); 
diff --git a/src/mapping/Mapping.cpp b/src/mapping/Mapping.cpp
index 84f5b9f33..83e238c07 100644
--- a/src/mapping/Mapping.cpp
+++ b/src/mapping/Mapping.cpp
@@ -138,7 +138,7 @@ void Mapping::prepare(){
       // Duplicate all frames (duplicates are used by sketch-map)
       mymap->duplicateFrameList();
       // Get the number of frames in the path
-      unsigned nfram=getNumberOfReferencePoints();
+      // unsigned nfram=getNumberOfReferencePoints();
       // fframes.resize( 2*nfram, 0.0 ); dfframes.resize( 2*nfram, 0.0 ); 
       plumed_assert( !mymap->mappingNeedsSetup() );
       // Resize all derivative arrays
diff --git a/src/vesselbase/ActionWithVessel.cpp b/src/vesselbase/ActionWithVessel.cpp
index 6c0380ee5..b1df3ea5c 100644
--- a/src/vesselbase/ActionWithVessel.cpp
+++ b/src/vesselbase/ActionWithVessel.cpp
@@ -56,8 +56,8 @@ ActionWithVessel::ActionWithVessel(const ActionOptions&ao):
   noderiv(true),
   actionIsBridged(false),
   nactive_tasks(0),
-  mydata(NULL),
   contributorsAreUnlocked(false),
+  mydata(NULL),
   weightHasDerivatives(false),
   stopwatch(*new Stopwatch),
   dertime_can_be_off(false),
diff --git a/src/vesselbase/StoreDataVessel.cpp b/src/vesselbase/StoreDataVessel.cpp
index e20d61b09..2c871dea8 100644
--- a/src/vesselbase/StoreDataVessel.cpp
+++ b/src/vesselbase/StoreDataVessel.cpp
@@ -32,8 +32,8 @@ StoreDataVessel::StoreDataVessel( const VesselOptions& da ):
 Vessel(da),
 max_lowmem_stash(3),
 vecsize(0),
-hard_cut(false),
-nspace(0)
+nspace(0),
+hard_cut(false)
 {
   ActionWithValue* myval=dynamic_cast<ActionWithValue*>( getAction() );
   if( !myval ) hasderiv=false;
-- 
GitLab