diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-07-22 22:43:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-07-22 22:43:18 (GMT) |
commit | 4af66b09e03af4e9b0b6a1293dfe746f48106aba (patch) | |
tree | 0cb162e0921a0a774a433f9d3cd9f08c44bbe57d /src/H5FDmulti.c | |
parent | 9b597a48552f5201b37793a4c6fece4fd9f1c346 (diff) | |
download | hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.zip hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.gz hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.bz2 |
[svn-r30219] Description:
More warning cleaups: down to 770 warnings (from ~940) in 134 files (from
148), with 28 unique kinds of warnings (from 31).
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial & parallel
(h5committest forthcoming)
Diffstat (limited to 'src/H5FDmulti.c')
-rw-r--r-- | src/H5FDmulti.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 0e49813..d0dfab3 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -44,16 +44,22 @@ #endif /* Loop through all mapped files */ -#define UNIQUE_MEMBERS(MAP,LOOPVAR) { \ - H5FD_mem_t _unmapped, LOOPVAR; \ - unsigned _seen[H5FD_MEM_NTYPES]; \ +#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) { \ + H5FD_mem_t ITER, LOOPVAR; \ + unsigned SEEN[H5FD_MEM_NTYPES]; \ \ - memset(_seen, 0, sizeof _seen); \ - for (_unmapped=H5FD_MEM_SUPER; _unmapped<H5FD_MEM_NTYPES; _unmapped=(H5FD_mem_t)(_unmapped+1)) { \ - LOOPVAR = MAP[_unmapped]; \ - if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \ + memset(SEEN, 0, sizeof SEEN); \ + for (ITER=H5FD_MEM_SUPER; ITER<H5FD_MEM_NTYPES; ITER=(H5FD_mem_t)(ITER+1)) { \ + LOOPVAR = MAP[ITER]; \ + if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=ITER; \ assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \ - if (_seen[LOOPVAR]++) continue; \ + if (SEEN[LOOPVAR]++) continue; \ + +/* Need two front-ends, since they are nested sometimes */ +#define UNIQUE_MEMBERS(MAP, LOOPVAR) \ + UNIQUE_MEMBERS_CORE(MAP, _unmapped, _seen, LOOPVAR) +#define UNIQUE_MEMBERS2(MAP, LOOPVAR) \ + UNIQUE_MEMBERS_CORE(MAP, _unmapped2, _seen2, LOOPVAR) #define ALL_MEMBERS(LOOPVAR) { \ H5FD_mem_t LOOPVAR; \ @@ -1904,7 +1910,7 @@ compute_next(H5FD_multi_t *file) } END_MEMBERS; UNIQUE_MEMBERS(file->fa.memb_map, mt1) { - UNIQUE_MEMBERS(file->fa.memb_map, mt2) { + UNIQUE_MEMBERS2(file->fa.memb_map, mt2) { if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] && (HADDR_UNDEF==file->memb_next[mt1] || file->memb_next[mt1]>file->fa.memb_addr[mt2])) { |