diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-11-01 20:12:01 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-11-01 20:12:01 (GMT) |
commit | a46c177ddfdb8578718eb3694811e634653c20de (patch) | |
tree | 219ff3377cd214ce9b282af02056651ca3df2611 /src/H5FDmpio.c | |
parent | 65597415a3faf5f68c5c638d6e65b45ce473b34b (diff) | |
download | hdf5-a46c177ddfdb8578718eb3694811e634653c20de.zip hdf5-a46c177ddfdb8578718eb3694811e634653c20de.tar.gz hdf5-a46c177ddfdb8578718eb3694811e634653c20de.tar.bz2 |
[svn-r23000] Description:
Bring r22998 from trunk to 1.8 branch:
Clean up warnings and bring changes from Coverity branch back to trunk:
r20451:
Fixed coverity 810
r20454:
Purpose: Fix coverity issue 816
Description: Modified various file drivers to always check the return value from
H5P_get_driver_info.
r20455:
Purpose: Cleanup fix for coverity issue 816
Description: Removed redundant check for "fa" in H5FD_core_open.
Tested on:
Mac OSX/64 10.8.2 (amazon) w/debug
(Too minor to require h5committest)
Diffstat (limited to 'src/H5FDmpio.c')
-rw-r--r-- | src/H5FDmpio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index e67e4ff..436770e 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1009,17 +1009,17 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id, if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") if(H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MPIO != H5P_get_driver(plist)) { - _fa.comm = MPI_COMM_SELF; /*default*/ - _fa.info = MPI_INFO_NULL; /*default*/ - fa = &_fa; + _fa.comm = MPI_COMM_SELF; /*default*/ + _fa.info = MPI_INFO_NULL; /*default*/ + fa = &_fa; } else { - fa = (const H5FD_mpio_fapl_t *)H5P_get_driver_info(plist); - assert(fa); + if(NULL == (fa = (const H5FD_mpio_fapl_t *)H5P_get_driver_info(plist))) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info") } /* Duplicate communicator and Info object for use by this file. */ if (FAIL==H5FD_mpi_comm_info_dup(fa->comm, fa->info, &comm_dup, &info_dup)) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed") /* convert HDF5 flags to MPI-IO flags */ /* some combinations are illegal; let MPI-IO figure it out */ |