summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 8ad29cb..442baac 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -227,8 +227,8 @@ H5F_init_interface(void)
* which are pending completion because there are object headers still
* open within the file.
*/
- if (H5I_register_type(H5I_FILE, H5I_FILEID_HASHSIZE, 0, (H5I_free_t)H5F_close)<H5I_FILE ||
- H5I_register_type(H5I_FILE_CLOSING, H5I_FILEID_HASHSIZE, 0, (H5I_free_t)H5F_close)<H5I_FILE)
+ if (H5I_register_type(H5I_FILE, (size_t)H5I_FILEID_HASHSIZE, 0, (H5I_free_t)H5F_close)<H5I_FILE ||
+ H5I_register_type(H5I_FILE_CLOSING, (size_t)H5I_FILEID_HASHSIZE, 0, (H5I_free_t)H5F_close)<H5I_FILE)
HGOTO_ERROR (H5E_FILE, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* ========== File Creation Property Class Initialization ============*/
@@ -1304,9 +1304,9 @@ H5F_locate_signature(H5FD_t *file, hid_t dxpl_id)
addr = (8==n) ? 0 : (haddr_t)1 << n;
if (H5FD_set_eoa(file, addr+H5F_SIGNATURE_LEN)<0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, HADDR_UNDEF, "unable to set EOA value for file signature")
- if (H5FD_read(file, H5FD_MEM_SUPER, dxpl_id, addr, H5F_SIGNATURE_LEN, buf)<0)
+ if (H5FD_read(file, H5FD_MEM_SUPER, dxpl_id, addr, (size_t)H5F_SIGNATURE_LEN, buf)<0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, HADDR_UNDEF, "unable to read file signature")
- if (!HDmemcmp(buf, H5F_SIGNATURE, H5F_SIGNATURE_LEN))
+ if (!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
break;
}
@@ -1955,7 +1955,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t d
#endif /* H5_HAVE_FPHDF5 */
/* Read the superblock if it hasn't been read before. */
- if (H5F_read_superblock(file, dxpl_id, &root_ent, HADDR_UNDEF, NULL, 0) < 0)
+ if (H5F_read_superblock(file, dxpl_id, &root_ent, HADDR_UNDEF, NULL, (size_t)0) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
#ifdef H5_HAVE_FPHDF5
@@ -2523,7 +2523,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_entry_t *root_ent, haddr_t addr
dbuf_size=sizeof(dbuf);
if (H5FD_set_eoa(lf, drv_addr + 16) < 0 ||
- H5FD_read(lf, H5FD_MEM_SUPER, dxpl_id, drv_addr, 16, p) < 0)
+ H5FD_read(lf, H5FD_MEM_SUPER, dxpl_id, drv_addr, (size_t)16, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to read driver information block")
} /* end if */
else {
@@ -2541,7 +2541,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_entry_t *root_ent, haddr_t addr
UINT32DECODE(p, driver_size);
/* Driver name and/or version */
- HDstrncpy(driver_name, (const char *)p, 8);
+ HDstrncpy(driver_name, (const char *)p, (size_t)8);
driver_name[8] = '\0';
p += 8; /* advance past name/version */
@@ -2754,7 +2754,7 @@ H5F_write_superblock(H5F_t *f, hid_t dxpl_id, uint8_t *buf)
/* Encode the file super block */
p = sbuf;
- HDmemcpy(p, H5F_SIGNATURE, H5F_SIGNATURE_LEN);
+ HDmemcpy(p, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
p += H5F_SIGNATURE_LEN;
*p++ = (uint8_t)super_vers;
*p++ = (uint8_t)freespace_vers;
@@ -2817,7 +2817,7 @@ H5F_write_superblock(H5F_t *f, hid_t dxpl_id, uint8_t *buf)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
/* Driver name */
- HDmemcpy(dbuf + 8, driver_name, 8);
+ HDmemcpy(dbuf + 8, driver_name, (size_t)8);
} /* end if */
/* Compute super block checksum */
@@ -3103,7 +3103,7 @@ H5F_close(H5F_t *f)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_close, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT(H5F_close)
assert(f->nrefs>0);
@@ -3232,7 +3232,7 @@ H5F_close(H5F_t *f)
int i; /* Local index variable */
/* Get the list of IDs of open dataset objects */
- while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_DATASET, (sizeof(objs)/sizeof(objs[0])), objs))!=0) {
+ while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_DATASET, (int)(sizeof(objs)/sizeof(objs[0])), objs))!=0) {
/* Try to close all the open objects */
for(i=0; i<obj_count; i++)
@@ -3241,7 +3241,7 @@ H5F_close(H5F_t *f)
} /* end while */
/* Get the list of IDs of open group objects */
- while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_GROUP, (sizeof(objs)/sizeof(objs[0])), objs))!=0) {
+ while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_GROUP, (int)(sizeof(objs)/sizeof(objs[0])), objs))!=0) {
/* Try to close all the open objects */
for(i=0; i<obj_count; i++)
@@ -3250,7 +3250,7 @@ H5F_close(H5F_t *f)
} /* end while */
/* Get the list of IDs of open named datatype objects */
- while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_DATATYPE, (sizeof(objs)/sizeof(objs[0])), objs))!=0) {
+ while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_DATATYPE, (int)(sizeof(objs)/sizeof(objs[0])), objs))!=0) {
/* Try to close all the open objects */
for(i=0; i<obj_count; i++)
@@ -3259,7 +3259,7 @@ H5F_close(H5F_t *f)
} /* end while */
/* Get the list of IDs of open attribute objects */
- while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_ATTR, (sizeof(objs)/sizeof(objs[0])), objs))!=0) {
+ while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_ATTR, (int)(sizeof(objs)/sizeof(objs[0])), objs))!=0) {
/* Try to close all the open objects */
for(i=0; i<obj_count; i++)