summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5R.c12
-rw-r--r--test/dt_arith.c6
2 files changed, 7 insertions, 11 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 64fb18c..d609cf4 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -361,13 +361,12 @@ H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, const void *_re
case H5R_DATASET_REGION:
{
- const hdset_reg_ref_t *ref = (const hdset_reg_ref_t *)_ref; /* Get pointer to correct type of reference struct */
H5HG_t hobjid; /* Heap object ID */
uint8_t *buf; /* Buffer to store serialized selection in */
const uint8_t *p; /* Pointer to OID to store */
/* Get the heap ID for the dataset region */
- p = (const uint8_t *)ref;
+ p = (const uint8_t *)_ref;
H5F_addr_decode(oloc.file, &p, &(hobjid.addr));
INT32DECODE(p, hobjid.idx);
@@ -542,7 +541,6 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref)
{
H5O_loc_t oloc; /* Object location */
const uint8_t *p; /* Pointer to OID to store */
- const hdset_reg_ref_t *ref = (const hdset_reg_ref_t *)_ref; /* Get pointer to correct type of reference struct */
H5HG_t hobjid; /* Heap object ID */
uint8_t *buf = NULL; /* Buffer to store serialized selection in */
H5S_t *ret_value;
@@ -557,7 +555,7 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref)
oloc.file = file;
/* Get the heap ID for the dataset region */
- p = (const uint8_t *)ref;
+ p = (const uint8_t *)_ref;
H5F_addr_decode(oloc.file, &p, &(hobjid.addr));
INT32DECODE(p, hobjid.idx);
@@ -687,12 +685,11 @@ H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, const void *_r
case H5R_DATASET_REGION:
{
- const hdset_reg_ref_t *ref = (const hdset_reg_ref_t *)_ref; /* Get pointer to correct type of reference struct */
H5HG_t hobjid; /* Heap object ID */
uint8_t *buf; /* Buffer to store serialized selection in */
/* Get the heap ID for the dataset region */
- p = (const uint8_t *)ref;
+ p = (const uint8_t *)_ref;
H5F_addr_decode(oloc.file, &p, &(hobjid.addr));
INT32DECODE(p, hobjid.idx);
@@ -837,13 +834,12 @@ H5R_get_name(H5F_t *f, hid_t dxpl_id, hid_t id, H5R_type_t ref_type,
case H5R_DATASET_REGION:
{
- const hdset_reg_ref_t *ref = (const hdset_reg_ref_t *)_ref; /* Get pointer to correct type of reference struct */
H5HG_t hobjid; /* Heap object ID */
uint8_t *buf; /* Buffer to store serialized selection in */
const uint8_t *p; /* Pointer to OID to store */
/* Get the heap ID for the dataset region */
- p = (const uint8_t *)ref;
+ p = (const uint8_t *)_ref;
H5F_addr_decode(oloc.file, &p, &(hobjid.addr));
INT32DECODE(p, hobjid.idx);
diff --git a/test/dt_arith.c b/test/dt_arith.c
index b06147c..1932e3d 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -4947,7 +4947,7 @@ run_int_fp_conv(const char *name)
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_LDOUBLE);
#endif
-#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
+#ifdef H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
#if H5_LLONG_TO_LDOUBLE_CORRECT
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE);
#else /* H5_LLONG_TO_LDOUBLE_CORRECT */
@@ -5071,7 +5071,7 @@ run_fp_int_conv(const char *name)
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULONG);
#endif
-#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
+#ifdef H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
if(!strcmp(name, "hw")) { /* Hardware conversion */
/* Windows .NET 2003 doesn't work for hardware conversion of this case.
* .NET should define this macro H5_HW_FP_TO_LLONG_NOT_WORKS. */
@@ -5152,7 +5152,7 @@ run_fp_int_conv(const char *name)
#endif
}
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
-#if H5_FP_TO_ULLONG_RIGHT_MAXIMUM && H5_LDOUBLE_TO_LLONG_ACCURATE
+#if defined(H5_FP_TO_ULLONG_RIGHT_MAXIMUM) && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG);
#else /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM && H5_LDOUBLE_TO_LLONG_ACCURATE*/
{