Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix warning by putting the array only where it's needed
[simgrid.git] / src / smpi / bindings / smpi_pmpi.cpp
index 8939bbf..b0f7cc3 100644 (file)
@@ -209,6 +209,9 @@ int PMPI_Error_class(int errorcode, int* errorclass) {
 }
 
 int PMPI_Error_string(int errorcode, char* string, int* resultlen){
+  static const char *smpi_error_string[] = {
+    FOREACH_ERROR(GENERATE_STRING)
+  };
   *resultlen = strlen(smpi_error_string[errorcode]);
   strncpy(string, smpi_error_string[errorcode], *resultlen);
   return MPI_SUCCESS;