summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-09-25 17:46:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-09-25 17:46:32 (GMT)
commited663577a5394d34a0cfbe5cd5443af1f7957dc5 (patch)
treef334d37a08de1f77ce046907bce49c9ff56c6597 /test/h5test.c
parenta6036953db9be2210acbed0882cf62c594b3a168 (diff)
downloadhdf5-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 'test/h5test.c')
-rw-r--r--test/h5test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/h5test.c b/test/h5test.c
index c647a21..4fae090 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -92,7 +92,7 @@ static const char *multi_letters = "msbrglo";
*-------------------------------------------------------------------------
*/
herr_t
-h5_errors(void UNUSED *client_data)
+h5_errors(void * UNUSED client_data)
{
H5_FAILED();
H5Eprint (stdout);
@@ -150,7 +150,7 @@ h5_cleanup(const char *base_name[], hid_t fapl)
H5FD_mem_t mt;
assert(strlen(multi_letters)==H5FD_MEM_NTYPES);
- for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt=mt+1) {
HDsnprintf(temp, sizeof temp, "%s-%c.h5",
filename, multi_letters[mt]);
HDremove(temp); /*don't care if it fails*/
@@ -438,7 +438,7 @@ h5_fileaccess(void)
HDmemset(memb_addr, 0, sizeof memb_addr);
assert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt++) {
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=mt+1) {
memb_fapl[mt] = H5P_DEFAULT;
sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];