summaryrefslogtreecommitdiffstats
path: root/test/dtypes.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-08-11 19:13:45 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-08-11 19:13:45 (GMT)
commit88fb6b1374e748b06826e17ca65c15087ae5b5ac (patch)
tree7c550af01bb506aa5d5bb9208abad6687f7b0f3a /test/dtypes.c
parent2a5454616a653b9830c103be7381af28ba397a3d (diff)
downloadhdf5-88fb6b1374e748b06826e17ca65c15087ae5b5ac.zip
hdf5-88fb6b1374e748b06826e17ca65c15087ae5b5ac.tar.gz
hdf5-88fb6b1374e748b06826e17ca65c15087ae5b5ac.tar.bz2
[svn-r25531] remove use of C99 PRI that failed on windows in dtypes.c
fix bugs where hid_t were assumed to be 32 bit ints or herr_t.
Diffstat (limited to 'test/dtypes.c')
-rw-r--r--test/dtypes.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index 65f5f8c..b2783c3 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -65,8 +65,8 @@
FAIL_STACK_ERROR \
if((NMEMBS) != H5I_nmembers(H5I_DATATYPE)) { \
H5_FAILED(); \
- printf(" #dtype ids expected: %lld; found: %"PRId64"\n", (long long)NMEMBS, \
- H5I_nmembers(H5I_DATATYPE)); \
+ printf(" #dtype ids expected: %lld; found: %lld\n", \
+ (long long)NMEMBS, (long long)H5I_nmembers(H5I_DATATYPE)); \
goto error; \
}
@@ -3008,7 +3008,7 @@ test_compound_16(void)
if(H5Fget_obj_ids(file, H5F_OBJ_DATATYPE, (size_t)2, open_dtypes) < 0) TEST_ERROR
if(open_dtypes[1]) {
H5_FAILED(); AT();
- printf(" H5Fget_obj_ids returned as second id: %"PRId64"; expected: 0\n", open_dtypes[1]);
+ printf(" H5Fget_obj_ids returned as second id: %lld; expected: 0\n", (long long)open_dtypes[1]);
goto error;
}
@@ -3549,6 +3549,7 @@ test_transient (hid_t fapl)
static hsize_t ds_size[2] = {10, 20};
hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1;
char filename[1024];
+ hid_t ret_id; /* Generic hid_t return value */
herr_t status;
TESTING("transient datatypes");
@@ -3583,9 +3584,9 @@ test_transient (hid_t fapl)
/* It should not be possible to create an attribute for a transient type */
H5E_BEGIN_TRY {
- status = H5Acreate2(type, "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT);
+ ret_id = H5Acreate2(type, "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
- if (status>=0) {
+ if (ret_id>=0) {
H5_FAILED();
HDputs (" Attributes should not be allowed for transient types!");
goto error;
@@ -5147,6 +5148,7 @@ test_encode(void)
size_t enum_buf_size = 0;
size_t vlstr_buf_size = 0;
unsigned char *cmpd_buf=NULL, *enum_buf=NULL, *vlstr_buf=NULL;
+ hid_t ret_id;
herr_t ret;
TESTING("functions of encoding and decoding datatypes");
@@ -5247,9 +5249,9 @@ test_encode(void)
/* Try decoding bogus buffer */
H5E_BEGIN_TRY {
- ret = H5Tdecode(cmpd_buf);
+ ret_id = H5Tdecode(cmpd_buf);
} H5E_END_TRY;
- if(ret!=FAIL) {
+ if(ret_id!=FAIL) {
H5_FAILED();
printf("Decoded bogus buffer!\n");
goto error;