From 2b5c52fb05ab54e4fa72e948acabc42e3f979ebd Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Thu, 26 Feb 2015 15:36:54 -0700 Subject: [PATCH] romio: add comment per Rob Latham's request --- ompi/mca/io/romio/romio/mpi-io/mpioimpl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h b/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h index 93b568f869..8f67bcea70 100644 --- a/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h +++ b/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h @@ -36,6 +36,11 @@ of correct programs */ #define MPIU_THREAD_CS_ENTER(x,y) #define MPIU_THREAD_CS_EXIT(x,y) +/* The MPI_DATATYPE_ISCOMMITTED macro now always sets err_=0. + This is an optimistic approach for Open MPI, but it is likely other + upper layers already checked the datatype was committed. + Not setting err_ is incorrect since it can lead to use of + uninitialized variable.*/ #define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) do { err_ = 0; } while (0) #ifdef HAVE_WINDOWS_H #define MPIU_UNREFERENCED_ARG(a) a