summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-15 18:00:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-15 18:00:20 (GMT)
commit2bacd3d4d745e5e78c55d83e1b4d3699a800bf88 (patch)
tree7ff2e1457af229dd21377863137001ab4b7ed609 /src
parent833db1dd16f21c352df8ea4d291ab14445292aad (diff)
downloadhdf5-2bacd3d4d745e5e78c55d83e1b4d3699a800bf88.zip
hdf5-2bacd3d4d745e5e78c55d83e1b4d3699a800bf88.tar.gz
hdf5-2bacd3d4d745e5e78c55d83e1b4d3699a800bf88.tar.bz2
[svn-r18564] Description:
Clean up compiler warnings. Tested on: Mac OS X/32 10.6.3 (amazon) w/debug (too simple to require h5committest)
Diffstat (limited to 'src')
-rw-r--r--src/H5Adeprec.c13
-rw-r--r--src/H5Dbtree.c6
-rw-r--r--src/H5Defl.c18
-rw-r--r--src/H5MP.c4
-rw-r--r--src/H5trace.c2
5 files changed, 29 insertions, 14 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 77f5736..2b244fd 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -334,6 +334,19 @@ H5Aget_num_attrs(hid_t loc_id)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get location for object")
break;
+ case H5I_UNINIT:
+ case H5I_BADID:
+ case H5I_FILE:
+ case H5I_DATASPACE:
+ case H5I_ATTR:
+ case H5I_REFERENCE:
+ case H5I_VFL:
+ case H5I_GENPROP_CLS:
+ case H5I_GENPROP_LST:
+ case H5I_ERROR_CLASS:
+ case H5I_ERROR_MSG:
+ case H5I_ERROR_STACK:
+ case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "inappropriate attribute target")
} /*lint !e788 All appropriate cases are covered */
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index 9cc15c0..bed3d4c 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -122,7 +122,7 @@ static H5B_ins_t H5D_btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr,
static herr_t H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw,
void *_key);
static herr_t H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw,
- void *_key);
+ const void *_key);
static herr_t H5D_btree_debug_key(FILE *stream, int indent, int fwidth,
const void *key, const void *udata);
@@ -706,9 +706,9 @@ H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, void *_key)
+H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
{
- H5D_btree_key_t *key = (H5D_btree_key_t *) _key;
+ const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
size_t ndims;
unsigned u;
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 8b2da6a..18750c8 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -269,16 +269,16 @@ H5D_efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
}
/* Read the data */
- while (size) {
+ while(size) {
HDassert(buf);
- if (u>=efl->nused)
- HGOTO_ERROR (H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file")
- if (H5F_OVERFLOW_HSIZET2OFFT (efl->slot[u].offset+skip))
- HGOTO_ERROR (H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed")
- if ((fd=HDopen (efl->slot[u].name, O_RDONLY, 0))<0)
- HGOTO_ERROR (H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file")
- if (HDlseek (fd, (off_t)(efl->slot[u].offset+skip), SEEK_SET)<0)
- HGOTO_ERROR (H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")
+ if(u>=efl->nused)
+ HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file")
+ if(H5F_OVERFLOW_HSIZET2OFFT (efl->slot[u].offset + skip))
+ HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed")
+ if((fd = HDopen(efl->slot[u].name, O_RDONLY, 0)) < 0)
+ HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file")
+ if(HDlseek(fd, (off_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
+ HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")
#ifndef NDEBUG
tempto_read = MIN(efl->slot[u].size-skip,(hsize_t)size);
H5_CHECK_OVERFLOW(tempto_read,hsize_t,size_t);
diff --git a/src/H5MP.c b/src/H5MP.c
index dd54316..b668d0c 100644
--- a/src/H5MP.c
+++ b/src/H5MP.c
@@ -451,9 +451,9 @@ H5MP_close(H5MP_pool_t *mp)
/* Free the page appropriately */
if(page->fac_alloc)
- page = H5FL_FAC_FREE(mp->page_fac, page);
+ page = (H5MP_page_t *)H5FL_FAC_FREE(mp->page_fac, page);
else
- page = H5MM_xfree(page);
+ page = (H5MP_page_t *)H5MM_xfree(page);
page = next_page;
} /* end while */
diff --git a/src/H5trace.c b/src/H5trace.c
index 8c83505..84f8436 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -684,6 +684,7 @@ H5_trace (const double *returning, const char *func, const char *type, ...)
case H5F_FILE_SPACE_VFD:
fprintf(out, "H5F_FILE_SPACE_VFD");
break;
+ case H5F_FILE_SPACE_NTYPES:
default:
fprintf(out, "%ld", (long)fs_type);
break;
@@ -726,6 +727,7 @@ H5_trace (const double *returning, const char *func, const char *type, ...)
case H5FD_MEM_OHDR:
fprintf(out, "H5FD_MEM_OHDR");
break;
+ case H5FD_MEM_NTYPES:
default:
fprintf(out, "%ld", (long)mem_type);
break;