Fix post-submit issues
authorRoland Schulz <roland.schulz@intel.com>
Tue, 3 Jul 2018 16:51:07 +0000 (09:51 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Tue, 3 Jul 2018 16:51:07 +0000 (09:51 -0700)
domdec/domdec.cpp + mdtypes/state.*:
Fix signed/unsigned issues

gmxana/gmx_trjcat.cpp:
GCC 4.8 false postive maybe-uninitialized warning

utility/gmxassert.h:
Fix that usage of _MSC_VER

Change-Id: I87250505899e8d62a468069fe349159645c6c55f

src/gromacs/domdec/domdec.cpp
src/gromacs/gmxana/gmx_trjcat.cpp
src/gromacs/mdtypes/state.cpp
src/gromacs/mdtypes/state.h
src/gromacs/utility/gmxassert.h

index b53457df634bd6af325bfefb849eff9ec1a5924d..5fd8b1a98e410a5e581167723d53ce9f43fc5768 100644 (file)
@@ -1508,7 +1508,7 @@ static void restoreAtomGroups(gmx_domdec_t *dd,
     /* Copy back the global charge group indices from state
      * and rebuild the local charge group to atom index.
      */
-    for (unsigned int i = 0; i < atomGroupsState.size(); i++)
+    for (gmx::index i = 0; i < atomGroupsState.size(); i++)
     {
         const int atomGroupGlobal  = atomGroupsState[i];
         const int groupSize        = gcgs_index[atomGroupGlobal + 1] - gcgs_index[atomGroupGlobal];
index 5eaf4d6c4e8c4cfe310814cdb6b27d48f0774a60..8521164281f40ca5e2806ac27bba790b289e484f 100644 (file)
@@ -477,7 +477,7 @@ int gmx_trjcat(int argc, char *argv[])
     gmx_bool          bNewFile, bIndex, bWrite;
     int              *cont_type;
     real             *readtime, *timest, *settime;
-    real              first_time  = 0, lasttime, last_ok_t = -1, timestep;
+    real              first_time  = 0, lasttime = 0, last_ok_t = -1, timestep;
     gmx_bool          lastTimeSet = FALSE;
     real              last_frame_time, searchtime;
     int               isize = 0, j;
index 28186c9daf63968e8f5e9f5494c8c483c574c0c0..ea2846b8e31a88e9326b3892b8cacf12f4a50ce3 100644 (file)
@@ -205,7 +205,7 @@ void comp_state(const t_state *st1, const t_state *st2,
 }
 
 rvec *makeRvecArray(gmx::ArrayRef<const gmx::RVec> v,
-                    unsigned int                   n)
+                    gmx::index                     n)
 {
     GMX_ASSERT(v.size() >= n, "We can't copy more elements than the vector size");
 
index 53d4b7a51113ebfd68488f7c019a29f29da398f8..8dc96970dd7d71cd12c8a1ad1254e1fa9f88377c 100644 (file)
@@ -268,7 +268,7 @@ void comp_state(const t_state *st1, const t_state *st2, gmx_bool bRMSD, real fto
 
 /*! \brief Allocates an rvec pointer and copy the contents of v to it */
 rvec *makeRvecArray(gmx::ArrayRef<const gmx::RVec> v,
-                    unsigned int                   n);
+                    gmx::index                     n);
 
 /*! \brief Determine the relative box components
  *
index 2c1a02c96d5da3e92a7da81fc1c6986982a5ddce..07adc6015db7d00d5720a845a4b6069e7236c5b1 100644 (file)
@@ -63,7 +63,7 @@
 #ifdef GMX_DISABLE_ASSERTS
 #define GMX_RELEASE_ASSERT(condition, msg)
 #else
-#  ifndef _MSC_VER
+#  if !defined _MSC_VER || defined __INTEL_COMPILER
 // Use an "immediately invoked function expression" to allow being
 // used in constexpr context with older GCC versions
 // https://akrzemi1.wordpress.com/2017/05/18/asserts-in-constexpr-functions/