summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-05 14:45:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-05 14:45:57 (GMT)
commit3f3a900177d9464376ea7baf5f989cbfa0e86b0a (patch)
tree38ed174516c0c65bcbbe4c543c54119bb83d5452 /src/H5T.c
parentf2190dd264fb97dfb699888d20c4ab6c112e45aa (diff)
downloadhdf5-3f3a900177d9464376ea7baf5f989cbfa0e86b0a.zip
hdf5-3f3a900177d9464376ea7baf5f989cbfa0e86b0a.tar.gz
hdf5-3f3a900177d9464376ea7baf5f989cbfa0e86b0a.tar.bz2
[svn-r18704] Description:
Bring r18702 from trunk to 1.8 branch: Bring r18672 from metadata journaling "merging" branch to trunk: Mostly changes to move to only using one 'user data' parameter for calls to H5AC_protect(), along with some minor reformatting code cleanups. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/H5T.c b/src/H5T.c
index d21a453..f1b9f1b 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3165,7 +3165,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
/* The object is already open. Free the H5T_shared_t struct
* we had been using and use the one that already exists.
* Not terribly efficient. */
- H5FL_FREE(H5T_shared_t, new_dt->shared);
+ new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
new_dt->shared = reopened_fo;
reopened_fo->fo_count++;
@@ -3207,7 +3207,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
*/
/* Only malloc if space has been allocated for members - NAF */
if(new_dt->shared->u.compnd.nalloc > 0) {
- new_dt->shared->u.compnd.memb = H5MM_malloc(new_dt->shared->u.compnd.nalloc *
+ new_dt->shared->u.compnd.memb = (H5T_cmemb_t *)H5MM_malloc(new_dt->shared->u.compnd.nalloc *
sizeof(H5T_cmemb_t));
if (NULL==new_dt->shared->u.compnd.memb)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
@@ -3265,9 +3265,9 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
* of each new member with copied values. That is, H5T_copy() is a
* deep copy.
*/
- new_dt->shared->u.enumer.name = H5MM_malloc(new_dt->shared->u.enumer.nalloc *
+ new_dt->shared->u.enumer.name = (char **)H5MM_malloc(new_dt->shared->u.enumer.nalloc *
sizeof(char*));
- new_dt->shared->u.enumer.value = H5MM_malloc(new_dt->shared->u.enumer.nalloc *
+ new_dt->shared->u.enumer.value = (uint8_t *)H5MM_malloc(new_dt->shared->u.enumer.nalloc *
new_dt->shared->size);
if(NULL == new_dt->shared->u.enumer.value)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
@@ -3721,7 +3721,7 @@ H5T_set_size(H5T_t *dt, size_t size)
H5T_str_t tmp_strpad; /* Temp. strpad info */
/* Get a copy of unsigned char type as the base/parent type */
- if (NULL==(base=H5I_object(H5T_NATIVE_UCHAR)))
+ if(NULL == (base = (H5T_t *)H5I_object(H5T_NATIVE_UCHAR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid base datatype");
dt->shared->parent=H5T_copy(base,H5T_COPY_ALL);
@@ -3899,8 +3899,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
HGOTO_DONE(1);
/* Build an index for each type so the names are sorted */
- if(NULL == (idx1 = H5MM_malloc(dt1->shared->u.compnd.nmembs * sizeof(unsigned))) ||
- NULL == (idx2 = H5MM_malloc(dt2->shared->u.compnd.nmembs * sizeof(unsigned))))
+ if(NULL == (idx1 = (unsigned *)H5MM_malloc(dt1->shared->u.compnd.nmembs * sizeof(unsigned))) ||
+ NULL == (idx2 = (unsigned *)H5MM_malloc(dt2->shared->u.compnd.nmembs * sizeof(unsigned))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed");
for(u = 0; u < dt1->shared->u.compnd.nmembs; u++)
idx1[u] = idx2[u] = u;
@@ -3977,8 +3977,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
} /* end else */
/* Build an index for each type so the names are sorted */
- if (NULL==(idx1 = H5MM_malloc(dt1->shared->u.enumer.nmembs * sizeof(unsigned))) ||
- NULL==(idx2 = H5MM_malloc(dt2->shared->u.enumer.nmembs * sizeof(unsigned))))
+ if(NULL == (idx1 = (unsigned *)H5MM_malloc(dt1->shared->u.enumer.nmembs * sizeof(unsigned))) ||
+ NULL == (idx2 = (unsigned *)H5MM_malloc(dt2->shared->u.enumer.nmembs * sizeof(unsigned))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed");
for (u=0; u<dt1->shared->u.enumer.nmembs; u++)
idx1[u] = u;
@@ -4310,7 +4310,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
* Make sure the first entry in the table is the no-op conversion path.
*/
if(0 == H5T_g.npaths) {
- if(NULL == (H5T_g.path = H5MM_malloc(128 * sizeof(H5T_path_t *))))
+ if(NULL == (H5T_g.path = (H5T_path_t **)H5MM_malloc(128 * sizeof(H5T_path_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path table")
H5T_g.apaths = 128;
if(NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t)))
@@ -4499,7 +4499,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
size_t na = MAX(128, 2 * H5T_g.apaths);
H5T_path_t **x;
- if(NULL == (x = H5MM_realloc(H5T_g.path, na * sizeof(H5T_path_t*))))
+ if(NULL == (x = (H5T_path_t **)H5MM_realloc(H5T_g.path, na * sizeof(H5T_path_t*))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5T_g.apaths = na;
H5T_g.path = x;