mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-06 14:56:51 +08:00
[svn-r6108] Purpose:
Code cleanup. Description: Cleaned up compiler warnings & updated a few comments. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)} FreeBSD 4.7 (sleipnir)
This commit is contained in:
parent
b09b4662b4
commit
ef92748be6
@ -1136,7 +1136,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5Arename(hid_t loc_id, char *old_name, char *new_name)
|
||||
H5Arename(hid_t loc_id, const char *old_name, const char *new_name)
|
||||
{
|
||||
H5G_entry_t *ent = NULL; /*symtab ent of object to attribute */
|
||||
herr_t ret_value; /* Return value */
|
||||
@ -1177,7 +1177,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5A_rename(H5G_entry_t *ent, char *old_name, char *new_name)
|
||||
H5A_rename(H5G_entry_t *ent, const char *old_name, const char *new_name)
|
||||
{
|
||||
int seq, idx=FAIL; /* Index of attribute being querried */
|
||||
H5A_t *found_attr; /* Attribute with OLD_NAME */
|
||||
|
12
src/H5B.c
12
src/H5B.c
@ -1501,9 +1501,7 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, H5B_operator_t op, haddr_t addr,
|
||||
if (NULL==(child=H5FL_ARR_ALLOC(haddr_t,(size_t)(2*H5B_Kvalue(f,type)),0)) ||
|
||||
NULL==(key=H5MM_malloc((2*H5B_Kvalue(f, type)+1)*type->sizeof_nkey)))
|
||||
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
|
||||
for (cur_addr=addr, ret_value=0;
|
||||
H5F_addr_defined(cur_addr);
|
||||
cur_addr=next_addr) {
|
||||
for (cur_addr=addr, ret_value=0; H5F_addr_defined(cur_addr); cur_addr=next_addr) {
|
||||
|
||||
/*
|
||||
* Save all the child addresses and native keys since we can't
|
||||
@ -1526,16 +1524,16 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, H5B_operator_t op, haddr_t addr,
|
||||
|
||||
/*
|
||||
* Perform the iteration operator, which might invoke an
|
||||
* application callback.
|
||||
* application callback.
|
||||
*/
|
||||
for (i=0; i<nchildren && !ret_value; i++) {
|
||||
ret_value = (*op)(f, key+i*type->sizeof_nkey,
|
||||
child[i], key+(i+1)*type->sizeof_nkey, udata);
|
||||
if (ret_value<0)
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iterator function failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* end for */
|
||||
} /* end for */
|
||||
} /* end else */
|
||||
|
||||
done:
|
||||
if(child!=NULL)
|
||||
|
@ -161,8 +161,8 @@ H5O_plist_decode(H5F_t UNUSED *f, const uint8_t *p, H5O_shared_t UNUSED *sh)
|
||||
* Retrieve the name of the property class with its parent(s). It's a
|
||||
* regular NULL terminated string.
|
||||
*/
|
||||
pclass = H5P_open_class_path(p);
|
||||
p += HDstrlen(p) + 1; /* + 1 for the NULL */
|
||||
pclass = H5P_open_class_path((const char *)p);
|
||||
p += HDstrlen((const char *)p) + 1; /* + 1 for the NULL */
|
||||
|
||||
UINT_DECODE(p, nprops);
|
||||
UINT_DECODE(p, hashsize);
|
||||
|
@ -742,7 +742,7 @@ H5Pset_deflate(hid_t plist_id, unsigned level)
|
||||
/* Add the filter */
|
||||
if(H5P_get(plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline");
|
||||
if (H5Z_append(&pline, H5Z_FILTER_DEFLATE, H5Z_FLAG_OPTIONAL, 1, &level)<0)
|
||||
if(H5Z_append(&pline, H5Z_FILTER_DEFLATE, H5Z_FLAG_OPTIONAL, 1, &level)<0)
|
||||
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add deflate filter to pipeline");
|
||||
if(H5P_set(plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
|
||||
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline");
|
||||
@ -756,22 +756,16 @@ done:
|
||||
* Function: H5Pset_shuffle
|
||||
*
|
||||
* Purpose: Sets the shuffling method for a permanent
|
||||
* filter
|
||||
* to H5Z_FILTER_SHUFFLE
|
||||
* filter to H5Z_FILTER_SHUFFLE
|
||||
* and bytes of the datatype of the array to be shuffled
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
* Programmer: Robb Matzke
|
||||
* Wednesday, April 15, 1998
|
||||
* Programmer: Kent Yang
|
||||
* Wednesday, November 13, 2002
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
* Raymond Lu
|
||||
* Tuesday, October 2, 2001
|
||||
* Changed the way to check parameter and set property for
|
||||
* generic property list.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
@ -797,7 +791,7 @@ H5Pset_shuffle(hid_t plist_id, unsigned bytes_of_type)
|
||||
/* Add the filter */
|
||||
if(H5P_get(plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline");
|
||||
if (H5Z_append(&pline, H5Z_FILTER_SHUFFLE, H5Z_FLAG_OPTIONAL, 1, &bytes_of_type)<0)
|
||||
if(H5Z_append(&pline, H5Z_FILTER_SHUFFLE, H5Z_FLAG_OPTIONAL, 1, &bytes_of_type)<0)
|
||||
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to shuffle the data");
|
||||
if(H5P_set(plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
|
||||
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline");
|
||||
|
Loading…
Reference in New Issue
Block a user