diff options
author | Sean McBride <sean@rogue-research.com> | 2021-03-04 16:04:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 16:04:41 (GMT) |
commit | fb210fc4fd70ce68b95a08f91eee2580552b6d21 (patch) | |
tree | 479fc17cdeef90c415fb446236014421f871de2c /src/H5FDmulti.c | |
parent | fab95ce7b309e3cb43cc9dc25c08da986f5d0e58 (diff) | |
download | hdf5-fb210fc4fd70ce68b95a08f91eee2580552b6d21.zip hdf5-fb210fc4fd70ce68b95a08f91eee2580552b6d21.tar.gz hdf5-fb210fc4fd70ce68b95a08f91eee2580552b6d21.tar.bz2 |
Use do-while trick to force H5Epush_ret() to require trailing semi (#380)
* Use do-while trick to force H5Epush_ret() to require trailing semi
Fixed ensuing compiler errors.
* Commit format changes from running clang-format with clang version 10.0.1.
* Use do-while trick to force H5Epush_ret() to require trailing semi
Fixed ensuing compiler errors. Updated RELEASE.txt.
This change was made to allow clang-format to correctly format the code.
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'src/H5FDmulti.c')
-rw-r--r-- | src/H5FDmulti.c | 214 |
1 files changed, 113 insertions, 101 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 68440d0..a024ace 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -436,12 +436,12 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_f /* Check arguments and supply default values */ if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1) if (!memb_map) - { - for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) - _memb_map[mt] = H5FD_MEM_DEFAULT; - memb_map = _memb_map; - } + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1); + if (!memb_map) { + for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) + _memb_map[mt] = H5FD_MEM_DEFAULT; + memb_map = _memb_map; + } if (!memb_fapl) { for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS); @@ -465,19 +465,20 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_f /* Map usage type */ mmt = memb_map[mt]; if (mmt < 0 || mmt >= H5FD_MEM_NTYPES) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", - -1) if (H5FD_MEM_DEFAULT == mmt) mmt = mt; + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", -1); + if (H5FD_MEM_DEFAULT == mmt) + mmt = mt; /* * All members of MEMB_FAPL must be either defaults or actual file * access property lists. */ if (H5P_DEFAULT != memb_fapl[mmt] && TRUE != H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1); - /* All names must be defined */ - if (!memb_name[mmt] || !memb_name[mmt][0]) H5Epush_ret( - func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1) + /* All names must be defined */ + if (!memb_name[mmt] || !memb_name[mmt][0]) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1); } /* @@ -529,13 +530,14 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl H5Eclear2(H5E_DEFAULT); if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", - -1) if (H5FD_MULTI != H5Pget_driver(fapl_id)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", - -1) if (NULL == (fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id))) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1) - - if (memb_map) memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t)); + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", -1); + if (H5FD_MULTI != H5Pget_driver(fapl_id)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1); + if (NULL == (fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id))) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1); + + if (memb_map) + memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t)); if (memb_fapl) { for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { if (fa->memb_fapl[mt] >= 0) @@ -672,10 +674,10 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out } END_MEMBERS; if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen * 2, buf + 8, NULL, H5P_DEFAULT) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); - /* Encode all name templates */ - p = buf + 8 + nseen * 2 * 8; + /* Encode all name templates */ + p = buf + 8 + nseen * 2 * 8; UNIQUE_MEMBERS(file->fa.memb_map, mt) { size_t n = strlen(file->fa.memb_name[mt]) + 1; @@ -730,15 +732,15 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) /* Make sure the name/version number is correct */ if (strcmp(name, "NCSAmult")) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid multi superblock", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid multi superblock", -1); - /* Set default values */ - ALL_MEMBERS(mt) - { - memb_addr[mt] = HADDR_UNDEF; - memb_eoa[mt] = HADDR_UNDEF; - memb_name[mt] = NULL; - } + /* Set default values */ + ALL_MEMBERS(mt) + { + memb_addr[mt] = HADDR_UNDEF; + memb_eoa[mt] = HADDR_UNDEF; + memb_name[mt] = NULL; + } END_MEMBERS; /* @@ -761,9 +763,9 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) memcpy(x, buf, (nseen * 2 * 8)); buf += nseen * 2 * 8; if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen * 2, x, NULL, H5P_DEFAULT) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) - ap = (haddr_t *)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning - - 2019/07/05, QAK */ + H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); + ap = (haddr_t *)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning - + 2019/07/05, QAK */ UNIQUE_MEMBERS(map, mt) { memb_addr[_unmapped] = *ap++; @@ -818,23 +820,23 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) } END_MEMBERS; if (compute_next(file) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1); - /* Open all necessary files */ - if (open_members(file) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1) + /* Open all necessary files */ + if (open_members(file) < 0) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1); - /* Set the EOA marker for all open files */ - UNIQUE_MEMBERS(file->fa.memb_map, mt) - { - if (file->memb[mt]) - if (H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1) + /* Set the EOA marker for all open files */ + UNIQUE_MEMBERS(file->fa.memb_map, mt) + { + if (file->memb[mt]) + if (H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt]) < 0) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1); - /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) - */ - file->memb_eoa[mt] = memb_eoa[mt]; - } + /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) + */ + file->memb_eoa[mt] = memb_eoa[mt]; + } END_MEMBERS; return 0; @@ -925,7 +927,7 @@ H5FD_multi_fapl_copy(const void *_old_fa) } END_MEMBERS; free(new_fa); - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't release object on error", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't release object on error", NULL); } return new_fa; } @@ -957,8 +959,9 @@ H5FD_multi_fapl_free(void *_fa) { if (fa->memb_fapl[mt] >= 0) if (H5Idec_ref(fa->memb_fapl[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", - -1) if (fa->memb_name[mt]) free(fa->memb_name[mt]); + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", -1); + if (fa->memb_name[mt]) + free(fa->memb_name[mt]); } END_MEMBERS; free(fa); @@ -996,24 +999,23 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!name || !*name) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", - NULL) if (0 == maxaddr || HADDR_UNDEF == maxaddr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL); + if (0 == maxaddr || HADDR_UNDEF == maxaddr) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL); - /* - * Initialize the file from the file access properties, using default - * values if necessary. Make sure to use CALLOC here because the code - * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa - * in H5FD_multi_t. - */ - if (NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t)))) H5Epush_ret( - func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", - NULL) if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MULTI != H5Pget_driver(fapl_id)) - { - close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS); - if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) - H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error) - } + /* + * Initialize the file from the file access properties, using default + * values if necessary. Make sure to use CALLOC here because the code + * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa + * in H5FD_multi_t. + */ + if (NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t)))) + H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL); + if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MULTI != H5Pget_driver(fapl_id)) { + close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS); + if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) + H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error) + } fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id); assert(fa); ALL_MEMBERS(mt) @@ -1110,16 +1112,16 @@ H5FD_multi_close(H5FD_t *_file) } END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1); - /* Clean up other stuff */ - ALL_MEMBERS(mt) - { - if (file->fa.memb_fapl[mt] >= 0) - (void)H5Idec_ref(file->fa.memb_fapl[mt]); - if (file->fa.memb_name[mt]) - free(file->fa.memb_name[mt]); - } + /* Clean up other stuff */ + ALL_MEMBERS(mt) + { + if (file->fa.memb_fapl[mt] >= 0) + (void)H5Idec_ref(file->fa.memb_fapl[mt]); + if (file->fa.memb_name[mt]) + free(file->fa.memb_name[mt]); + } END_MEMBERS; free(file->name); @@ -1277,7 +1279,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == memb_eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", - HADDR_UNDEF) if (memb_eoa > 0) memb_eoa += file->fa.memb_addr[mt]; + HADDR_UNDEF); + if (memb_eoa > 0) + memb_eoa += file->fa.memb_addr[mt]; } else if (file->fa.relax) { /* @@ -1288,7 +1292,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != memb_eoa); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF); } if (memb_eoa > eoa) @@ -1308,7 +1312,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", - HADDR_UNDEF) if (eoa > 0) eoa += file->fa.memb_addr[mmt]; + HADDR_UNDEF); + if (eoa > 0) + eoa += file->fa.memb_addr[mmt]; } else if (file->fa.relax) { /* @@ -1319,7 +1325,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != eoa); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF); } } @@ -1382,9 +1388,9 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) H5E_BEGIN_TRY { status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt])); } H5E_END_TRY; if (status < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1); - return 0; + return 0; } /* end H5FD_multi_set_eoa() */ /*------------------------------------------------------------------------- @@ -1426,7 +1432,9 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == tmp_eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", - HADDR_UNDEF) if (tmp_eof > 0) tmp_eof += file->fa.memb_addr[mt]; + HADDR_UNDEF); + if (tmp_eof > 0) + tmp_eof += file->fa.memb_addr[mt]; } else if (file->fa.relax) { /* @@ -1437,7 +1445,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != tmp_eof); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF); } if (tmp_eof > eof) eof = tmp_eof; @@ -1457,7 +1465,9 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", - HADDR_UNDEF) if (eof > 0) eof += file->fa.memb_addr[mmt]; + HADDR_UNDEF); + if (eof > 0) + eof += file->fa.memb_addr[mmt]; } else if (file->fa.relax) { /* @@ -1468,7 +1478,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != eof); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF); } } return eof; @@ -1496,9 +1506,10 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) /* Get data type for multi driver */ if (H5Pget_multi_type(fapl, &type) < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't get data type for multi driver", - -1) if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1) mmt = - file->fa.memb_map[type]; + -1); + if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1); + mmt = file->fa.memb_map[type]; if (H5FD_MEM_DEFAULT == mmt) mmt = type; @@ -1542,8 +1553,8 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) } if (HADDR_UNDEF == (addr = H5FDalloc(file->memb[mmt], mmt, dxpl_id, size))) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file can't alloc", HADDR_UNDEF) - addr += file->fa.memb_addr[mmt]; + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file can't alloc", HADDR_UNDEF); + addr += file->fa.memb_addr[mmt]; /*#ifdef TMP if ( addr + size > file->eoa ) { @@ -1551,7 +1562,7 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \ - "can't set eoa", HADDR_UNDEF) + "can't set eoa", HADDR_UNDEF); } } #else @@ -1756,9 +1767,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) } } if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1); - return 0; + return 0; } /*------------------------------------------------------------------------- @@ -1797,9 +1808,9 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) } } if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1); - return 0; + return 0; } /* end H5FD_multi_truncate() */ /*------------------------------------------------------------------------- @@ -1860,7 +1871,8 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw) } /* end if */ if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTLOCKFILE, "error locking member files", -1) return 0; + H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTLOCKFILE, "error locking member files", -1); + return 0; } /* H5FD_multi_lock() */ @@ -1897,9 +1909,9 @@ H5FD_multi_unlock(H5FD_t *_file) END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "error unlocking member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "error unlocking member files", -1); - return 0; + return 0; } /* H5FD_multi_unlock() */ /*------------------------------------------------------------------------- @@ -1996,9 +2008,9 @@ open_members(H5FD_multi_t *file) } END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1); - return 0; + return 0; } H5_GCC_DIAG_ON("format-nonliteral") |