summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-08-02 21:54:34 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-08-02 21:54:34 (GMT)
commit60d3b3091764c2ec9bede45aeacb6b2da1fa22d8 (patch)
tree31cc6c48f0f4976d10e4a7b9d726bb4222f2c0f3 /src/H5R.c
parentbbaf4fb19b452e093bde1616df351dfa34f30840 (diff)
parentcc7ae0a7fe9451062a1fb370ae2a36c0789a60e3 (diff)
downloadhdf5-60d3b3091764c2ec9bede45aeacb6b2da1fa22d8.zip
hdf5-60d3b3091764c2ec9bede45aeacb6b2da1fa22d8.tar.gz
hdf5-60d3b3091764c2ec9bede45aeacb6b2da1fa22d8.tar.bz2
[svn-r22623] merge from tunk
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5R.c b/src/H5R.c
index af471ee..2e5012b 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -213,7 +213,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5
HDassert(_ref);
HDassert(loc);
HDassert(name);
- HDassert(ref_type > H5R_BADTYPE || ref_type < H5R_MAXTYPE);
+ HDassert(ref_type > H5R_BADTYPE && ref_type < H5R_MAXTYPE);
/* Set up object location to fill in */
obj_loc.oloc = &oloc;
@@ -268,7 +268,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection")
/* Increase buffer size to allow for the dataset OID */
- buf_size += sizeof(haddr_t);
+ buf_size += (hssize_t)sizeof(haddr_t);
/* Allocate the space to store the serialized information */
H5_CHECK_OVERFLOW(buf_size, hssize_t, size_t);
@@ -422,7 +422,7 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type,
FUNC_ENTER_NOAPI_NOINIT
HDassert(_ref);
- HDassert(ref_type > H5R_BADTYPE || ref_type < H5R_MAXTYPE);
+ HDassert(ref_type > H5R_BADTYPE && ref_type < H5R_MAXTYPE);
HDassert(file);
/* Initialize the object location */
@@ -529,6 +529,8 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type,
} /* end case */
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
HGOTO_ERROR(H5E_REFERENCE, H5E_BADTYPE, FAIL, "can't identify type of object referenced")
} /* end switch */