summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-01-12 15:16:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-01-12 15:16:56 (GMT)
commitf2bf0d60a25f4a88d1a26bd95e268adec05eba3c (patch)
tree582fb5653c4b50f8ee2eafca0b6365549284ed13
parent7e8d2c982199c03dc5aa4fd95dd7d44b83d84f65 (diff)
parentd92575889bc5a509ba2ac428c2086855edd26b32 (diff)
downloadhdf5-f2bf0d60a25f4a88d1a26bd95e268adec05eba3c.zip
hdf5-f2bf0d60a25f4a88d1a26bd95e268adec05eba3c.tar.gz
hdf5-f2bf0d60a25f4a88d1a26bd95e268adec05eba3c.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/hdf5_1_8)
* commit 'd92575889bc5a509ba2ac428c2086855edd26b32': fix merge error Merge pull request #2244 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop Merge pull request #2071 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop Merge pull request #2234 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop
-rw-r--r--hl/tools/gif2h5/decompress.c2
-rw-r--r--src/H5B2int.c14
-rw-r--r--src/H5FScache.c6
-rw-r--r--src/H5HFtest.c2
-rw-r--r--src/H5Oainfo.c2
-rw-r--r--src/H5Oattr.c2
-rw-r--r--src/H5Ofill.c4
-rw-r--r--src/H5Oginfo.c4
-rw-r--r--src/H5Olayout.c2
-rw-r--r--src/H5Olinfo.c2
-rw-r--r--src/H5Olink.c2
-rw-r--r--src/H5Osdspace.c2
-rw-r--r--src/H5SMmessage.c2
-rw-r--r--src/H5Sprivate.h2
-rw-r--r--src/H5Sselect.c4
-rw-r--r--src/H5Ztrans.c2
-rw-r--r--src/H5overflow.txt1
-rw-r--r--test/dsets.c8
-rw-r--r--test/dtypes.c4
-rw-r--r--test/h5test.c3
-rw-r--r--test/ntypes.c2
-rw-r--r--test/tsohm.c8
-rw-r--r--testpar/t_dset.c2
-rw-r--r--testpar/t_mpi.c10
-rw-r--r--tools/h5diff/dynlib_diff.c4
-rw-r--r--tools/h5dump/dynlib_dump.c4
-rw-r--r--tools/h5dump/h5dumpgentest.c20
-rw-r--r--tools/h5import/h5import.c6
-rw-r--r--tools/h5ls/dynlib_ls.c4
-rw-r--r--tools/h5repack/h5repackgentest.c4
-rw-r--r--tools/lib/h5diff.c2
-rw-r--r--tools/lib/h5diff_attr.c2
-rw-r--r--tools/perform/pio_engine.c6
-rw-r--r--tools/perform/pio_perf.c4
34 files changed, 74 insertions, 74 deletions
diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c
index 6668c22..bd9a37d 100644
--- a/hl/tools/gif2h5/decompress.c
+++ b/hl/tools/gif2h5/decompress.c
@@ -173,7 +173,7 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
/* Now read in values from the image descriptor */
IWidth = GifImageDesc->ImageWidth;
IHeight = GifImageDesc->ImageHeight;
- Interlace = GifImageDesc->PackedField & 0x40;
+ Interlace = (uint8_t)(GifImageDesc->PackedField & 0x40);
/*
* Note that I ignore the possible existence of a local color map. I'm
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 93e737e..518a41f 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -265,7 +265,7 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
old_node_nrec = internal->node_ptrs[idx].node_nrec;
/* Determine "middle" record to promote to internal node */
- mid_record = old_node_nrec / 2;
+ mid_record = (uint16_t)(old_node_nrec / 2);
/* Copy "upper half" of records to new child */
HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0),
@@ -525,8 +525,8 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
if(*left_nrec < *right_nrec) {
/* Moving record from right node to left */
- uint16_t new_right_nrec = (uint16_t)(*left_nrec + *right_nrec) / 2; /* New number of records for right child */
- uint16_t move_nrec = (uint16_t)(*right_nrec - new_right_nrec); /* Number of records to move from right node to left */
+ uint16_t new_right_nrec = (uint16_t)((*left_nrec + *right_nrec) / 2); /* New number of records for right child */
+ uint16_t move_nrec = (uint16_t)(*right_nrec - new_right_nrec); /* Number of records to move from right node to left */
/* Copy record from parent node down into left child */
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
@@ -571,8 +571,8 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
else {
/* Moving record from left node to right */
- uint16_t new_left_nrec = (uint16_t)(*left_nrec + *right_nrec) / 2; /* New number of records for left child */
- uint16_t move_nrec = (uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
+ uint16_t new_left_nrec = (uint16_t)((*left_nrec + *right_nrec) / 2); /* New number of records for left child */
+ uint16_t move_nrec = (uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
/* Slide records in right node up */
HDmemmove(H5B2_NAT_NREC(right_native, hdr, move_nrec),
@@ -765,8 +765,8 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
{
/* Compute new # of records in each node */
unsigned total_nrec = (unsigned)(*left_nrec + *middle_nrec + *right_nrec + 2);
- uint16_t new_middle_nrec = (uint16_t)(total_nrec - 2) / 3;
- uint16_t new_left_nrec = (uint16_t)((total_nrec - 2) - new_middle_nrec) / 2;
+ uint16_t new_middle_nrec = (uint16_t)((total_nrec - 2) / 3);
+ uint16_t new_left_nrec = (uint16_t)(((total_nrec - 2) - new_middle_nrec) / 2);
uint16_t new_right_nrec = (uint16_t)((total_nrec - 2) - (unsigned)(new_left_nrec + new_middle_nrec));
uint16_t curr_middle_nrec = *middle_nrec;
diff --git a/src/H5FScache.c b/src/H5FScache.c
index fdf4e4d..e3fd237 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -631,8 +631,8 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void
/* Walk through the buffer, deserializing sections */
do {
- hsize_t sect_size; /* Current section size */
- size_t node_count; /* # of sections of this size */
+ hsize_t sect_size = 0; /* Current section size */
+ size_t node_count = 0; /* # of sections of this size */
size_t u; /* Local index variable */
/* The number of sections of this node's size */
@@ -646,7 +646,7 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void
/* Loop over nodes of this size */
for(u = 0; u < node_count; u++) {
H5FS_section_info_t *new_sect; /* Section that was deserialized */
- haddr_t sect_addr; /* Address of free space section in the address space */
+ haddr_t sect_addr = 0; /* Address of free space section in the address space */
unsigned sect_type; /* Type of free space section */
unsigned des_flags; /* Flags from deserialize callback */
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index 27f4d10..20bdc50 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -478,7 +478,7 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
HDassert(obj_type);
/* Get the type for a heap ID */
- *obj_type = *id & H5HF_ID_TYPE_MASK;
+ *obj_type = (uint8_t)(*id & H5HF_ID_TYPE_MASK);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_get_id_type_test() */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 5aab4c6..48e6978 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -194,7 +194,7 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
*p++ = H5O_AINFO_VERSION;
/* The flags for the attribute indices */
- flags = ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0;
+ flags = (unsigned char)(ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0);
flags = (unsigned char)(flags | (ainfo->index_corder ? H5O_AINFO_INDEX_CORDER : 0));
*p++ = flags;
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index c2c0fe3..4d703f6 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -315,7 +315,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
/* The character encoding for the attribute's name, in later versions */
if(attr->shared->version >= H5O_ATTR_VERSION_3)
- *p++ = attr->shared->encoding;
+ *p++ = (uint8_t)attr->shared->encoding;
/* Write the name including null terminator */
HDmemcpy(p, attr->shared->name, name_len);
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 159f730..eee6cd2 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -374,10 +374,10 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
if(fill->version < H5O_FILL_VERSION_3) {
/* Space allocation time */
- *p++ = fill->alloc_time;
+ *p++ = (uint8_t)fill->alloc_time;
/* Fill value writing time */
- *p++ = fill->fill_time;
+ *p++ = (uint8_t)fill->fill_time;
/* Whether fill value is defined */
*p++ = (uint8_t)fill->fill_defined;
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index 8ba1f71..fedab8c 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -170,7 +170,7 @@ static herr_t
H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg;
- unsigned char flags; /* Flags for encoding group info */
+ unsigned char flags = 0; /* Flags for encoding group info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -182,7 +182,7 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
*p++ = H5O_GINFO_VERSION;
/* The flags for the group info */
- flags = ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0;
+ flags = (unsigned char)(ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0);
flags = (unsigned char)(flags | (ginfo->store_est_entry_info ? H5O_GINFO_STORE_EST_ENTRY_INFO : 0));
*p++ = flags;
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 131b4bf..185dca1 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -307,7 +307,7 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
*p++ = (uint8_t)H5O_LAYOUT_VERSION_3;
/* Layout class */
- *p++ = mesg->type;
+ *p++ = (uint8_t)mesg->type;
/* Write out layout class specific information */
switch(mesg->type) {
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index a612ae5..adda4ea 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -204,7 +204,7 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
*p++ = H5O_LINFO_VERSION;
/* The flags for the link indices */
- index_flags = linfo->track_corder ? H5O_LINFO_TRACK_CORDER : 0;
+ index_flags = (uint8_t)(linfo->track_corder ? H5O_LINFO_TRACK_CORDER : 0);
index_flags = (uint8_t)(index_flags | (linfo->index_corder ? H5O_LINFO_INDEX_CORDER : 0));
*p++ = index_flags;
diff --git a/src/H5Olink.c b/src/H5Olink.c
index c0dd1d8..0a74381 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -315,7 +315,7 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
/* Store the type of a non-default link */
if(link_flags & H5O_LINK_STORE_LINK_TYPE)
- *p++ = lnk->type;
+ *p++ = (uint8_t)lnk->type;
/* Store the link creation order in the file, if its valid */
if(lnk->corder_valid)
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 627ea19..e633a30 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -258,7 +258,7 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
/* Dataspace type */
if(sdim->version > H5O_SDSPACE_VERSION_1)
- *p++ = sdim->type;
+ *p++ = (uint8_t)sdim->type;
else {
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index 979adfa..f342e28 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -301,7 +301,7 @@ H5SM_message_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
/* Sanity check */
HDassert(ctx);
- *raw++ = message->location;
+ *raw++ = (uint8_t)message->location;
UINT32ENCODE(raw, message->hash);
if(message->location == H5SM_IN_HEAP) {
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index a509bee..49d5c92 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -235,7 +235,7 @@ H5_DLL herr_t H5S_select_iterate(void *buf, const H5T_t *type, const H5S_t *spac
H5_DLL herr_t H5S_select_fill(const void *fill, size_t fill_size,
const H5S_t *space, void *buf);
H5_DLL htri_t H5S_select_valid(const H5S_t *space);
-H5_DLL hssize_t H5S_get_select_npoints(const H5S_t *space);
+H5_DLL hsize_t H5S_get_select_npoints(const H5S_t *space);
H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset);
H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset);
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 8615dc5..0055421 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -327,7 +327,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-hssize_t
+hsize_t
H5S_get_select_npoints(const H5S_t *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -335,7 +335,7 @@ H5S_get_select_npoints(const H5S_t *space)
/* Check args */
HDassert(space);
- FUNC_LEAVE_NOAPI((hssize_t)space->select.num_elem)
+ FUNC_LEAVE_NOAPI(space->select.num_elem)
} /* H5S_get_select_npoints() */
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index bffb41b..c4a16e1 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -260,7 +260,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
#define H5Z_XFORM_DO_OP5(TYPE, SIZE) \
{ \
- TYPE val = ((tree->type == H5Z_XFORM_INTEGER) ? (TYPE)tree->value.int_val : (TYPE)tree->value.float_val); \
+ TYPE val = (TYPE)((tree->type == H5Z_XFORM_INTEGER) ? tree->value.int_val : tree->value.float_val); \
H5VM_array_fill(array, &val, sizeof(TYPE), (SIZE)); \
}
diff --git a/src/H5overflow.txt b/src/H5overflow.txt
index 636b2ef..506827e 100644
--- a/src/H5overflow.txt
+++ b/src/H5overflow.txt
@@ -29,6 +29,7 @@
# Creation Date: 2009/04/09
unsigned, UNSIGNED;
+int8_t, SIGNED;
int, SIGNED;
uint8_t, UNSIGNED;
uint16_t, UNSIGNED;
diff --git a/test/dsets.c b/test/dsets.c
index 6bd0f7f..5bc4f70 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -5071,7 +5071,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
(dset=H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
@@ -5085,7 +5085,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
(dset=H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -5100,7 +5100,7 @@ test_types(hid_t file)
(dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto error;
if(H5Sclose(space) < 0) goto error;
if(H5Tclose(type) < 0) goto error;
@@ -5114,7 +5114,7 @@ test_types(hid_t file)
(dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto error;
if(H5Sclose(space) < 0) goto error;
if(H5Tclose(type) < 0) goto error;
diff --git a/test/dtypes.c b/test/dtypes.c
index 27ad8e7..b8894aa 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1198,8 +1198,8 @@ test_compound_6(void)
orig = (unsigned char*)HDmalloc(nelmts * sizeof(struct st));
for (i=0; i<(int)nelmts; i++) {
s_ptr = ((struct st*)((void *)orig)) + i;
- s_ptr->b = (i*8+1) & 0x7fff;
- s_ptr->d = (i*8+6) & 0x7fff;
+ s_ptr->b = (int16_t)((i*8+1) & 0x7fff);
+ s_ptr->d = (int16_t)((i*8+6) & 0x7fff);
}
HDmemcpy(buf, orig, nelmts*sizeof(struct st));
diff --git a/test/h5test.c b/test/h5test.c
index 64b05f4..3a55346 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1211,8 +1211,7 @@ h5_dump_info_object(MPI_Info info)
int flag;
int i, nkeys;
- HDprintf("Dumping MPI Info Object(%d) (up to %d bytes per item):\n", (int)info,
- MPI_MAX_INFO_VAL);
+ HDprintf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
if (info==MPI_INFO_NULL){
HDprintf("object is MPI_INFO_NULL\n");
}
diff --git a/test/ntypes.c b/test/ntypes.c
index 1cc7c33..4afac38 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -2484,7 +2484,7 @@ test_opaque_dtype(hid_t file)
TEST_ERROR;
for(i = 0; i < sizeof(wbuf); i++)
- wbuf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ wbuf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) TEST_ERROR;
if(H5Sclose(space) < 0) TEST_ERROR;
diff --git a/test/tsohm.c b/test/tsohm.c
index 171b069..d44fc32 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3226,11 +3226,11 @@ test_sohm_extlink(void)
static int
test_sohm_extend_dset_helper(hid_t fcpl_id, hbool_t close_reopen)
{
- hid_t file_id = -1;
- hid_t orig_space_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t orig_space_id = H5I_INVALID_HID;
hid_t space1_id, space2_id, space3_id;
- hid_t dcpl_id = -1;
- hid_t dset1_id, dset2_id, dset3_id;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t dset1_id, dset2_id = H5I_INVALID_HID, dset3_id = H5I_INVALID_HID;
hsize_t dims1[] = {1, 2};
hsize_t max_dims[] = {H5S_UNLIMITED, 2};
hsize_t dims2[] = {5, 2};
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 68f96da..36382d4 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -3790,7 +3790,7 @@ test_no_collective_cause_mode_filter(int selection_mode)
uint32_t no_collective_cause_global_expected = 0;
const char * filename;
- const char * test_name;
+ const char * test_name = "I/O";
hbool_t is_chunked=1;
int mpi_size = -1;
int mpi_rank = -1;
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 890a918..fe78317 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -303,7 +303,7 @@ static int test_mpio_gb_file(char *filename) {
mpi_rank, mpi_off, mpi_off);
/* set data to some trivial pattern for easy verification */
for (j = 0; j < MB; j++)
- *(buf + j) = i * mpi_size + mpi_rank;
+ *(buf + j) = (int8_t)(i * mpi_size + mpi_rank);
if (VERBOSE_MED)
HDfprintf(stdout,
"proc %d: writing %d bytes at offset %lld\n",
@@ -351,7 +351,7 @@ static int test_mpio_gb_file(char *filename) {
mrc = MPI_File_read_at(fh, mpi_off, buf, MB, MPI_BYTE,
&mpi_stat);
INFO((mrc == MPI_SUCCESS), "GB size file read");
- expected = i * mpi_size + (mpi_size - mpi_rank - 1);
+ expected = (int8_t)(i * mpi_size + (mpi_size - mpi_rank - 1));
vrfyerrs = 0;
for (j = 0; j < MB; j++) {
if ((*(buf + j) != expected)
@@ -526,7 +526,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
* ==================================================*/
irank = 0;
for (i = 0; i < DIMSIZE; i++)
- writedata[i] = irank * DIMSIZE + i;
+ H5_CHECKED_ASSIGN(writedata[i], uint8_t, irank * DIMSIZE + i, int)
mpi_off = irank * DIMSIZE;
/* Only one process writes */
@@ -597,7 +597,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
return 1;
};
for (i = 0; i < DIMSIZE; i++) {
- expect_val = irank * DIMSIZE + i;
+ H5_CHECKED_ASSIGN(expect_val, uint8_t, irank * DIMSIZE + i, int);
if (readdata[i] != expect_val) {
PRINTID;
HDprintf("read data[%d:%d] got %02x, expect %02x\n", irank, i,
@@ -697,7 +697,7 @@ static int test_mpio_derived_dtype(char *filename) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
retcode = 0;
for (i = 0; i < 3; i++)
- buf[i] = i + 1;
+ H5_CHECKED_ASSIGN(buf[i], int8_t, i + 1, int);
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename,
MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fh))
diff --git a/tools/h5diff/dynlib_diff.c b/tools/h5diff/dynlib_diff.c
index 571452e..661a6dc 100644
--- a/tools/h5diff/dynlib_diff.c
+++ b/tools/h5diff/dynlib_diff.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5dump/dynlib_dump.c b/tools/h5dump/dynlib_dump.c
index 571452e..661a6dc 100644
--- a/tools/h5dump/dynlib_dump.c
+++ b/tools/h5dump/dynlib_dump.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 8ba752d..967bc0f 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -2545,7 +2545,7 @@ static void gent_bitfields(void)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -2559,7 +2559,7 @@ static void gent_bitfields(void)
(dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -9664,7 +9664,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ buf[i] = (uint8_t)(0xff ^ i);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
@@ -9679,7 +9679,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ buf2[i] = (uint16_t)(0xffff ^ (i * 16));
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9729,7 +9729,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ H5_CHECKED_ASSIGN(buf[i], uint8_t, 0xff ^ i, size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
}
@@ -9745,7 +9745,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ H5_CHECKED_ASSIGN(buf2[i], uint16_t, 0xffff ^ (i * 16), size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9768,8 +9768,8 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++) {
- buf5[i].a = (uint8_t)0xff ^ (uint8_t)i;
- buf5[i].b = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ H5_CHECKED_ASSIGN(buf5[i].a, uint8_t, 0xff ^ i, size_t);
+ H5_CHECKED_ASSIGN(buf5[i].b, uint16_t, 0xffff ^ (i * 16), size_t);
buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
}
@@ -10343,7 +10343,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -10352,7 +10352,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 1eef5ab..bd1689f 100644
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -4707,14 +4707,14 @@ static int process(struct Options *opt)
return (0);
}
-uint16_t swap_uint16( uint16_t val)
+uint16_t swap_uint16(uint16_t val)
{
- return (val << 8) | (val >> 8);
+ return (uint16_t)((val << 8) | (val >> 8));
}
int16_t swap_int16(int16_t val)
{
- return (val << 8) | ((val >> 8) & 0xFF);
+ return (int16_t)((val << 8) | ((val >> 8) & 0xFF));
}
uint32_t swap_uint32(uint32_t val)
diff --git a/tools/h5ls/dynlib_ls.c b/tools/h5ls/dynlib_ls.c
index 571452e..661a6dc 100644
--- a/tools/h5ls/dynlib_ls.c
+++ b/tools/h5ls/dynlib_ls.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5repack/h5repackgentest.c b/tools/h5repack/h5repackgentest.c
index aaac285..77fb28a 100644
--- a/tools/h5repack/h5repackgentest.c
+++ b/tools/h5repack/h5repackgentest.c
@@ -266,7 +266,7 @@ generate_uint8be(hbool_t external) {
for (i = 0, n = 0; i < dims[0]; i++) {
for (j = 0; j < dims[1]; j++) {
for (k = 0; k < dims[2]; k++, n++) {
- wdata[n] = n * ((n & 1) ? (-1) : (1));
+ wdata[n] = (uint8_t)((n & 1) ? -n : n);
}
}
}
@@ -296,7 +296,7 @@ generate_f32le(hbool_t external) {
/* Generate values */
for (i = 0, k = 0, n = 0; i < dims[0]; i++) {
for (j = 0; j < dims[1]; j++, k++, n++) {
- wdata[k] = n * 801.1 * ((k % 5 == 1) ? (-1) : (1));
+ wdata[k] = (float)(n * 801.1 * ((k % 5 == 1) ? (-1) : (1)));
}
}
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index c028c4e..6569778 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -907,7 +907,7 @@ h5diff(const char *fname1,
parallel_print("file1 file2\n");
parallel_print("---------------------------------------\n");
for(u = 0; u < match_list->nobjs; u++) {
- char c1, c2;
+ int c1, c2;
c1 = (match_list->objs[u].flags[0]) ? 'x' : ' ';
c2 = (match_list->objs[u].flags[1]) ? 'x' : ' ';
parallel_print("%5c %6c %-15s\n", c1, c2, match_list->objs[u].name);
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 7f08cc7..a526aa4 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -273,7 +273,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
parallel_print(" obj1 obj2\n");
parallel_print(" --------------------------------------\n");
for(i = 0; i < (unsigned int) table_lp->nattrs; i++) {
- char c1, c2;
+ int c1, c2;
c1 = (table_lp->attrs[i].exist[0]) ? 'x' : ' ';
c2 = (table_lp->attrs[i].exist[1]) ? 'x' : ' ';
parallel_print("%5c %6c %-15s\n", c1, c2, table_lp->attrs[i].name);
diff --git a/tools/perform/pio_engine.c b/tools/perform/pio_engine.c
index 798e32e..b5d91aa 100644
--- a/tools/perform/pio_engine.c
+++ b/tools/perform/pio_engine.c
@@ -208,7 +208,7 @@ do_pio(parameters param)
bsize = buf_size; /* Actual buffer size */
}
else {
- snbytes = (off_t)sqrt(nbytes); /* General dataset size */
+ snbytes = (off_t)sqrt((double)nbytes); /* General dataset size */
bsize = buf_size * blk_size; /* Actual buffer size */
}
@@ -601,7 +601,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the dataset square.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = (off_t)sqrt((double)nbytes);
/* Contiguous Pattern: */
if (!parms->interleaved) {
@@ -1577,7 +1577,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the 'dataset square'.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = (off_t)sqrt((double)nbytes);
bsize = buf_size * blk_size;
diff --git a/tools/perform/pio_perf.c b/tools/perform/pio_perf.c
index 93741c4..361e824 100644
--- a/tools/perform/pio_perf.c
+++ b/tools/perform/pio_perf.c
@@ -1155,9 +1155,9 @@ report_parameters(struct options *opts)
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
HDfprintf(output, "rank %d: File size=", rank);
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->min_num_procs,2)
+ recover_size_and_print((long long)(pow((double)(opts->num_bpp * opts->min_num_procs),2)
* opts->num_dsets), ":");
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->max_num_procs,2)
+ recover_size_and_print((long long)(pow((double)(opts->num_bpp * opts->max_num_procs),2)
* opts->num_dsets), "\n");
HDfprintf(output, "rank %d: Transfer buffer size=", rank);