summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-07-26 19:33:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-07-26 19:33:59 (GMT)
commit7143164de9d7de52516697bbb6bfc7cd2cf749d6 (patch)
tree107977d9f4732e672d5690072a2e85d82e1ebf28 /src/H5R.c
parent74e00605264ffb2b782b4f28be15accc7784217c (diff)
downloadhdf5-7143164de9d7de52516697bbb6bfc7cd2cf749d6.zip
hdf5-7143164de9d7de52516697bbb6bfc7cd2cf749d6.tar.gz
hdf5-7143164de9d7de52516697bbb6bfc7cd2cf749d6.tar.bz2
[svn-r22608] Description:
Switch propert list/class iteration from internal to external form of iteration, cleaning up and simplifying the code a bit. Bring other general improvements from plist_encode_decode branch back to trunk. Clean up many warnings. Tested on: Mac OSX/64 10.7.4 (amazon) w/gcc 4.7, debug and C++ & FORTRAN (too minor to require h5committest)
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 8fac4bf..d45947b 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -217,7 +217,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;
@@ -272,7 +272,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);
@@ -418,7 +418,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 */
@@ -525,6 +525,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 */
@@ -880,7 +882,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-ssize_t
+static ssize_t
H5R_get_name(H5F_t *f, hid_t lapl_id, hid_t dxpl_id, hid_t id, H5R_type_t ref_type,
const void *_ref, char *name, size_t size)
{