Fix issues for clang-analyzer-8
[alexxy/gromacs.git] / src / external / thread_mpi / src / comm.cpp
index 28464fa1ef924db5a5f0be0b7d956ad33ac17b37..86089ba12a59c1447b5afdbfa44482f9c108c9d6 100644 (file)
@@ -555,8 +555,8 @@ int tMPI_Comm_split(tMPI_Comm comm, int color, int key, tMPI_Comm *newcomm)
     int                 i, j;
     int                 N = tMPI_Comm_N(comm);
     volatile tMPI_Comm *newcomm_list;
-    volatile int        colors[MAX_PREALLOC_THREADS]; /* array with the colors
-                                                         of each thread */
+    volatile int        colors[MAX_PREALLOC_THREADS] = { 0 }; /* array with the colors
+                                                                 of each thread */
     volatile int        keys[MAX_PREALLOC_THREADS];   /* same for keys (only one of
                                                          the threads actually suplies
                                                          these arrays to the comm