]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/smpi/mpich3-test/info/infoenv.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add missing '&' causing temporary value to be modified
[simgrid.git] / teshsuite / smpi / mpich3-test / info / infoenv.c
index ff895c8aae4382cb86e85e434815195c51d416d7..08da1d16f1853e7fc8343d0940c41eb3b282d344 100644 (file)
@@ -12,14 +12,15 @@ static int verbose = 0;
 int main(int argc, char *argv[])
 {
     char value[MPI_MAX_INFO_VAL];
-    char *keys[] = { "command", "argv", "maxprocs", "soft", "host", "arch", "wdir", "file",
-                     "thread_level", 0 };
+    const char *keys[] = { "command", "argv", "maxprocs", "soft", "host", "arch", "wdir", "file",
+        "thread_level", 0
+    };
     int flag, i;
 
     MPI_Init(NULL, NULL);
 
     for (i = 0; keys[i]; i++) {
-        MPI_Info_get(MPI_INFO_ENV, keys[i], MPI_MAX_INFO_VAL, value, &flag);
+        MPI_Info_get(MPI_INFO_ENV, (char*)keys[i], MPI_MAX_INFO_VAL, value, &flag);
         if (flag && verbose)
             printf("command: %s\n", value);
     }