summaryrefslogtreecommitdiffstats
path: root/test/enum.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-10 19:00:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-10 19:00:39 (GMT)
commitb4ff3e6e79a46fb474eb1786a11a7d2451455111 (patch)
treeb73756af2d3eaee487c4087d55fbb04e1eba62b5 /test/enum.c
parentda5058310c324dcce93dc9328ef2bd53bf1fed02 (diff)
downloadhdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.zip
hdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.tar.gz
hdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.tar.bz2
[svn-r16560] Description:
Remove another call to H5E_clear_stack() from within the library. Clean up lots of compiler warnings. Tested on: Mac OS X/32 10.5.6 (amazon) (followup on other platforms forthcoming)
Diffstat (limited to 'test/enum.c')
-rw-r--r--test/enum.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/test/enum.c b/test/enum.c
index 91a3790..4599a7c 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -455,7 +455,6 @@ test_funcs(void)
hid_t type=-1;
c_e1 val;
size_t size;
- int offset;
H5T_pad_t inpad;
H5T_cset_t cset;
herr_t ret;
@@ -463,18 +462,18 @@ test_funcs(void)
TESTING("some functions with enumeration types");
/* A native integer */
- if ((type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error;
- if (H5Tenum_insert(type, "RED", CPTR(val, E1_RED ))<0) goto error;
- if (H5Tenum_insert(type, "GREEN", CPTR(val, E1_GREEN))<0) goto error;
- if (H5Tenum_insert(type, "BLUE", CPTR(val, E1_BLUE ))<0) goto error;
- if (H5Tenum_insert(type, "WHITE", CPTR(val, E1_WHITE))<0) goto error;
- if (H5Tenum_insert(type, "BLACK", CPTR(val, E1_BLACK))<0) goto error;
-
- if ((size=H5Tget_precision(type))==0) goto error;
- if ((size=H5Tget_size(type))==0) goto error;
- if ((offset=H5Tget_offset(type))<0) goto error;
- if (H5Tget_sign(type)<0) goto error;
- if (H5Tget_super(type)<0) goto error;
+ if((type = H5Tcreate(H5T_ENUM, sizeof(c_e1))) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "RED", CPTR(val, E1_RED )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "GREEN", CPTR(val, E1_GREEN)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLUE", CPTR(val, E1_BLUE )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "WHITE", CPTR(val, E1_WHITE)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLACK", CPTR(val, E1_BLACK)) < 0) FAIL_STACK_ERROR
+
+ if(H5Tget_precision(type) == 0) FAIL_STACK_ERROR
+ if(H5Tget_size(type) == 0) FAIL_STACK_ERROR
+ if(H5Tget_offset(type) < 0) FAIL_STACK_ERROR
+ if(H5Tget_sign(type) < 0) FAIL_STACK_ERROR
+ if(H5Tget_super(type) < 0) FAIL_STACK_ERROR
H5E_BEGIN_TRY {
ret=H5Tset_pad(type, H5T_PAD_ZERO, H5T_PAD_ONE);