diff options
Diffstat (limited to 'src/H5FDmpi.c')
-rw-r--r-- | src/H5FDmpi.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c index 01c28e6..866a2cf 100644 --- a/src/H5FDmpi.c +++ b/src/H5FDmpi.c @@ -56,12 +56,15 @@ char H5FD_mpi_native_g[] = "native"; int H5FD_mpi_get_rank(const H5FD_t *file) { - const H5FD_class_mpi_t *cls=(const H5FD_class_mpi_t *)(file->cls); + const H5FD_class_mpi_t *cls; + int ret_value; FUNC_ENTER_NOAPI(FAIL) - assert(file && cls); + assert(file); + cls = (const H5FD_class_mpi_t *)(file->cls); + assert(cls); assert(cls->get_rank); /* All MPI drivers must implement this */ /* Dispatch to driver */ @@ -92,12 +95,14 @@ done: int H5FD_mpi_get_size(const H5FD_t *file) { - const H5FD_class_mpi_t *cls=(const H5FD_class_mpi_t *)(file->cls); + const H5FD_class_mpi_t *cls; int ret_value; FUNC_ENTER_NOAPI(FAIL) - assert(file && cls); + assert(file); + cls = (const H5FD_class_mpi_t *)(file->cls); + assert(cls); assert(cls->get_size); /* All MPI drivers must implement this */ /* Dispatch to driver */ @@ -128,12 +133,14 @@ done: MPI_Comm H5FD_mpi_get_comm(const H5FD_t *file) { - const H5FD_class_mpi_t *cls=(const H5FD_class_mpi_t *)(file->cls); + const H5FD_class_mpi_t *cls; MPI_Comm ret_value; FUNC_ENTER_NOAPI(MPI_COMM_NULL) - assert(file && cls); + assert(file); + cls = (const H5FD_class_mpi_t *)(file->cls); + assert(cls); assert(cls->get_comm); /* All MPI drivers must implement this */ /* Dispatch to driver */ |