diff options
-rw-r--r-- | src/H5FDcore.c | 2 | ||||
-rw-r--r-- | src/H5Fsuper.c | 6 | ||||
-rw-r--r-- | src/H5Omessage.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 4c0d906..72c3a0f 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -434,7 +434,7 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, /* If an existing file is opened, load the whole file into memory. */ if(!(H5F_ACC_CREAT & flags)) { - unsigned char *x; + unsigned char *x=NULL; size_t size; if (HDfstat(file->fd, &sb)<0) diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 3ecdfb4..c8ff253 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -256,7 +256,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc, haddr_t addr, /* Compute super block checksum for versions greater than 1 */ if(super_vers >= HDF5_SUPERBLOCK_VERSION_2) { - computed_chksum = H5_checksum_metadata(sbuf, (p - sbuf), 0); + computed_chksum = H5_checksum_metadata(sbuf, (unsigned) (p - sbuf), 0); /* Read stored super block checksum */ UINT32DECODE(p, read_chksum); @@ -264,7 +264,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc, haddr_t addr, HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "bad checksum on superblock") } - HDassert(p - sbuf == H5F_SUPERBLOCK_SIZE(super_vers, f)); + HDassert((unsigned) (p - sbuf) == H5F_SUPERBLOCK_SIZE(super_vers, f)); /* * Check if superblock address is different from base address and @@ -360,7 +360,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc, haddr_t addr, HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "bad checksum on driver information block") } - HDassert(p - dbuf == driver_size + H5F_DRVINFOBLOCK_HDR_SIZE + H5F_DRVINFO_CHKSUM(drv_vers)); + HDassert((unsigned) (p - dbuf) == driver_size + H5F_DRVINFOBLOCK_HDR_SIZE + H5F_DRVINFO_CHKSUM(drv_vers)); } /* end if */ /* diff --git a/src/H5Omessage.c b/src/H5Omessage.c index f80faf1..0a575fb 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -1366,7 +1366,7 @@ H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned idx; /* Absolute index of current message in all messages */ unsigned sequence; /* Relative index of current message for messages of type */ H5O_mesg_t *idx_msg; /* Pointer to current message */ - void *native_mesg; /* Native, readable message */ + void *native_mesg=NULL; /* Native, readable message */ hbool_t native_mesg_alloc = FALSE; /* True if native_mesg needs to be freed */ herr_t ret_value = H5_ITER_CONT; /* Return value */ |