summaryrefslogtreecommitdiffstats
path: root/test/tattr.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/tattr.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/tattr.c')
-rw-r--r--test/tattr.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/tattr.c b/test/tattr.c
index ecdf38c..c9f2de2 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -388,7 +388,7 @@ test_attr_compound_read(void)
char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */
int rank; /* Attribute rank */
hsize_t dims[ATTR_MAX_DIMS]; /* Attribute dimensions */
- H5T_class_t class; /* Attribute datatype class */
+ H5T_class_t t_class; /* Attribute datatype class */
H5T_order_t order; /* Attribute datatype order */
size_t size; /* Attribute datatype size as stored in file */
int fields; /* # of Attribute datatype fields */
@@ -438,8 +438,8 @@ test_attr_compound_read(void)
/* Verify Datatype */
type=H5Aget_type(attr);
CHECK(type, FAIL, "H5Aget_type");
- class=H5Tget_class(type);
- VERIFY(class, H5T_COMPOUND, "H5Tget_class");
+ t_class=H5Tget_class(type);
+ VERIFY(t_class, H5T_COMPOUND, "H5Tget_class");
fields=H5Tget_nmembers(type);
VERIFY(fields, 3, "H5Tget_nmembers");
for(i=0; i<fields; i++) {
@@ -462,8 +462,8 @@ test_attr_compound_read(void)
/* Verify each field's type, class & size */
field=H5Tget_member_type(type,0);
CHECK(field, FAIL, "H5Tget_member_type");
- class=H5Tget_class(field);
- VERIFY(class, H5T_INTEGER, "H5Tget_class");
+ t_class=H5Tget_class(field);
+ VERIFY(t_class, H5T_INTEGER, "H5Tget_class");
order=H5Tget_order(field);
VERIFY(order, H5Tget_order(H5T_NATIVE_INT), "H5Tget_order");
size=H5Tget_size(field);
@@ -471,8 +471,8 @@ test_attr_compound_read(void)
H5Tclose(field);
field=H5Tget_member_type(type,1);
CHECK(field, FAIL, "H5Tget_member_type");
- class=H5Tget_class(field);
- VERIFY(class, H5T_FLOAT, "H5Tget_class");
+ t_class=H5Tget_class(field);
+ VERIFY(t_class, H5T_FLOAT, "H5Tget_class");
order=H5Tget_order(field);
VERIFY(order, H5Tget_order(H5T_NATIVE_DOUBLE), "H5Tget_order");
size=H5Tget_size(field);
@@ -480,8 +480,8 @@ test_attr_compound_read(void)
H5Tclose(field);
field=H5Tget_member_type(type,2);
CHECK(field, FAIL, "H5Tget_member_type");
- class=H5Tget_class(field);
- VERIFY(class, H5T_INTEGER, "H5Tget_class");
+ t_class=H5Tget_class(field);
+ VERIFY(t_class, H5T_INTEGER, "H5Tget_class");
order=H5Tget_order(field);
VERIFY(order, H5Tget_order(H5T_NATIVE_SCHAR), "H5Tget_order");
size=H5Tget_size(field);
@@ -775,7 +775,7 @@ test_attr_mult_read(void)
char temp_name[ATTR_NAME_LEN]; /* Buffer for mangling attribute names */
int rank; /* Attribute rank */
hsize_t dims[ATTR_MAX_DIMS]; /* Attribute dimensions */
- H5T_class_t class; /* Attribute datatype class */
+ H5T_class_t t_class; /* Attribute datatype class */
H5T_order_t order; /* Attribute datatype order */
size_t size; /* Attribute datatype size as stored in file */
int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
@@ -819,8 +819,8 @@ test_attr_mult_read(void)
/* Verify Datatype */
type=H5Aget_type(attr);
CHECK(type, FAIL, "H5Aget_type");
- class=H5Tget_class(type);
- VERIFY(class, H5T_INTEGER, "H5Tget_class");
+ t_class=H5Tget_class(type);
+ VERIFY(t_class, H5T_INTEGER, "H5Tget_class");
order=H5Tget_order(type);
VERIFY(order, H5Tget_order(H5T_NATIVE_INT), "H5Tget_order");
size=H5Tget_size(type);
@@ -884,8 +884,8 @@ test_attr_mult_read(void)
/* Verify Datatype */
type=H5Aget_type(attr);
CHECK(type, FAIL, "H5Aget_type");
- class=H5Tget_class(type);
- VERIFY(class, H5T_INTEGER, "H5Tget_class");
+ t_class=H5Tget_class(type);
+ VERIFY(t_class, H5T_INTEGER, "H5Tget_class");
order=H5Tget_order(type);
VERIFY(order, H5Tget_order(H5T_NATIVE_INT), "H5Tget_order");
size=H5Tget_size(type);
@@ -954,8 +954,8 @@ test_attr_mult_read(void)
/* Verify Datatype */
type=H5Aget_type(attr);
CHECK(type, FAIL, "H5Aget_type");
- class=H5Tget_class(type);
- VERIFY(class, H5T_FLOAT, "H5Tget_class");
+ t_class=H5Tget_class(type);
+ VERIFY(t_class, H5T_FLOAT, "H5Tget_class");
order=H5Tget_order(type);
VERIFY(order, H5Tget_order(H5T_NATIVE_DOUBLE), "H5Tget_order");
size=H5Tget_size(type);