[svn-r13635] Description:

Clean up code and reduce compiler warnings...

Tested on:
    Mac OS X/32 10.4.9 (amazon)
This commit is contained in:
Quincey Koziol 2007-04-11 10:36:06 -05:00
parent 4e3029bf82
commit 78158e8dbf
6 changed files with 17 additions and 14 deletions

View File

@ -644,7 +644,7 @@ H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo)
HDassert(oh);
/* Retrieve the "attribute info" structure */
if(ret_value = H5O_msg_read_real(f, dxpl_id, oh, H5O_AINFO_ID, ainfo)) {
if((ret_value = H5O_msg_read_real(f, dxpl_id, oh, H5O_AINFO_ID, ainfo))) {
/* Check if we don't know how many attributes there are */
if(ret_value->nattrs == HSIZET_MAX) {
/* Check if we are using "dense" attribute storage */

View File

@ -578,7 +578,7 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
haddr_t ret_value; /* Return value */

View File

@ -560,9 +560,13 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
haddr_t addr;
static const char *func="H5FD_stdio_alloc"; /* Function Name for error reporting */
static const char *func = "H5FD_stdio_alloc"; /* Function Name for error reporting */
haddr_t ret_value; /* Return value */
/* Shut compiler up */
type = type;
dxpl_id = dxpl_id;
/* Clear the error stack */
H5Eclear_stack(H5E_DEFAULT);
@ -570,22 +574,22 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp
addr = file->eoa;
/* Check if we need to align this block */
if(size>=file->pub.threshold) {
if(size >= file->pub.threshold) {
/* Check for an already aligned block */
if(addr%file->pub.alignment!=0)
addr=((addr/file->pub.alignment)+1)*file->pub.alignment;
if((addr % file->pub.alignment) != 0)
addr = ((addr / file->pub.alignment) + 1) * file->pub.alignment;
} /* end if */
#ifndef H5_HAVE_FSEEKO
/* If fseeko isn't available, big files (>2GB) won't be supported. */
if(addr+size>BIG_FILE)
H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "can't write file bigger than 2GB because fseeko isn't available", -1)
if((addr + size) > BIG_FILE)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "can't write file bigger than 2GB because fseeko isn't available", HADDR_UNDEF)
#endif
file->eoa = addr+size;
file->eoa = addr + size;
/* Set return value */
ret_value=addr;
ret_value = addr;
return(ret_value);
} /* H5FD_stdio_alloc() */

View File

@ -333,7 +333,7 @@ H5G_obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
HDassert(grp_oloc);
/* Retrieve the "link info" structure */
if(ret_value = H5O_msg_read(grp_oloc, H5O_LINFO_ID, linfo, dxpl_id)) {
if((ret_value = H5O_msg_read(grp_oloc, H5O_LINFO_ID, linfo, dxpl_id))) {
/* Check if we don't know how many links there are */
if(ret_value->nlinks == HSIZET_MAX) {
/* Check if we are using "dense" link storage */

View File

@ -237,7 +237,6 @@ hbool_t
H5MF_alloc_overflow(H5F_t *f, hsize_t size)
{
hsize_t space_needed = 0; /* Accumulator variable */
H5FD_mem_t type; /* Type of memory */
size_t c; /* Local index variable */
hbool_t ret_value; /* Return value */

View File

@ -4639,7 +4639,7 @@ done:
H5O_loc_t *
H5T_oloc(H5T_t *dt)
{
H5O_loc_t *ret_value = NULL;
H5O_loc_t *ret_value;
FUNC_ENTER_NOAPI(H5T_oloc, NULL)
@ -4678,7 +4678,7 @@ done:
H5G_name_t *
H5T_nameof(H5T_t *dt)
{
H5G_name_t *ret_value = NULL;
H5G_name_t *ret_value;
FUNC_ENTER_NOAPI(H5T_nameof, NULL)