diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-09-25 17:46:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-09-25 17:46:32 (GMT) |
commit | ed663577a5394d34a0cfbe5cd5443af1f7957dc5 (patch) | |
tree | f334d37a08de1f77ce046907bce49c9ff56c6597 /src/H5FD.c | |
parent | a6036953db9be2210acbed0882cf62c594b3a168 (diff) | |
download | hdf5-ed663577a5394d34a0cfbe5cd5443af1f7957dc5.zip hdf5-ed663577a5394d34a0cfbe5cd5443af1f7957dc5.tar.gz hdf5-ed663577a5394d34a0cfbe5cd5443af1f7957dc5.tar.bz2 |
[svn-r4473] Purpose:
Code cleanup for better compatibility with C++ compilers
Description:
C++ compilers are choking on our C code, for various reasons:
we used our UNUSED macro incorrectly when referring to pointer types
we used various C++ keywords as variables, etc.
we incremented enum's with the ++ operator.
Solution:
Changed variables, etc.to avoid C++ keywords (new, class, typename, typeid,
template)
Fixed usage of UNUSED macro from this:
char UNUSED *c
to this:
char * UNUSED c
Switched the enums from x++ to x=x+1
Platforms tested:
FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5FD.c')
-rw-r--r-- | src/H5FD.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -189,7 +189,7 @@ H5FDregister(const H5FD_class_t *cls) HRETURN_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`read' and/or `write' method is not defined"); } - for (type=H5FD_MEM_DEFAULT; type<H5FD_MEM_NTYPES; type++) { + for (type=H5FD_MEM_DEFAULT; type<H5FD_MEM_NTYPES; type = type+1) { if (cls->fl_map[type]<H5FD_MEM_NOLIST || cls->fl_map[type]>=H5FD_MEM_NTYPES) { HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, @@ -870,7 +870,7 @@ H5FD_close(H5FD_t *file) /* Free all free-lists, leaking any memory thus described. Also leaks * file space allocated but not used when metadata aggregation is * turned on. */ - for (i=H5FD_MEM_DEFAULT; i<H5FD_MEM_NTYPES; i++) { + for (i=H5FD_MEM_DEFAULT; i<H5FD_MEM_NTYPES; i=i+1) { for (cur=file->fl[i]; cur; cur=next) { #ifdef H5F_DEBUG nblocks++; |