Merge release-2018 into master
[alexxy/gromacs.git] / src / gromacs / pbcutil / mshift.cpp
index 9c984e9b48d40f8b3a562f411d2271adf64c80b8..60bc72a243363e5a5594e0f4ad87b8be9d915eca 100644 (file)
@@ -162,7 +162,7 @@ gmx_noreturn static void g_error(int line, const char *file)
     gmx_fatal(FARGS, "Trying to print nonexistent graph (file %s, line %d)",
               file, line);
 }
-#define GCHECK(g) if (g == NULL) g_error(__LINE__, __FILE__)
+#define GCHECK(g) if ((g) == NULL) g_error(__LINE__, __FILE__)
 
 void p_graph(FILE *log, const char *title, t_graph *g)
 {
@@ -529,7 +529,7 @@ void done_graph(t_graph *g)
  ************************************************************/
 
 static void mk_1shift_tric(int npbcdim, const matrix box, const rvec hbox,
-                           const rvec xi, const rvec xj, int *mi, int *mj)
+                           const rvec xi, const rvec xj, const int *mi, int *mj)
 {
     /* Calculate periodicity for triclinic box... */
     int  m, d;
@@ -567,7 +567,7 @@ static void mk_1shift_tric(int npbcdim, const matrix box, const rvec hbox,
 }
 
 static void mk_1shift(int npbcdim, const rvec hbox, const rvec xi, const rvec xj,
-                      int *mi, int *mj)
+                      const int *mi, int *mj)
 {
     /* Calculate periodicity for rectangular box... */
     int  m;
@@ -597,7 +597,7 @@ static void mk_1shift(int npbcdim, const rvec hbox, const rvec xi, const rvec xj
 }
 
 static void mk_1shift_screw(const matrix box, const rvec hbox,
-                            const rvec xi, const rvec xj, int *mi, int *mj)
+                            const rvec xi, const rvec xj, const int *mi, int *mj)
 {
     /* Calculate periodicity for rectangular box... */
     int  signi, m;
@@ -723,7 +723,7 @@ static int mk_grey(egCol egc[], t_graph *g, int *AtomI,
     return ng;
 }
 
-static int first_colour(int fC, egCol Col, t_graph *g, egCol egc[])
+static int first_colour(int fC, egCol Col, t_graph *g, const egCol egc[])
 /* Return the first node with colour Col starting at fC.
  * return -1 if none found.
  */