summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5HFhuge.c4
-rw-r--r--src/H5Zscaleoffset.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index e2663cd..4a4d2c3 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -632,7 +632,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Retrieve the object's address & length */
obj_addr = found_rec.addr;
- obj_size = found_rec.len;
+ H5_ASSIGN_OVERFLOW(/* To: */ obj_size, /* From: */ found_rec.len, /* From: */ hsize_t, /* To: */ size_t);
filter_mask = found_rec.filter_mask;
} /* end if */
else {
@@ -649,7 +649,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Retrieve the object's address & length */
obj_addr = found_rec.addr;
- obj_size = found_rec.len;
+ H5_ASSIGN_OVERFLOW(/* To: */ obj_size, /* From: */ found_rec.len, /* From: */ hsize_t, /* To: */ size_t);
} /* end else */
} /* end else */
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 2c55188..b561775 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -123,7 +123,7 @@ H5Z_class_t H5Z_SCALEOFFSET[1] = {{
*/ \
for(i = 0; i < sizeof(type); i++) \
((unsigned char *)&cd_values[H5Z_SCALEOFFSET_PARM_FILVAL])[i] = \
- (fill_val & ((type)0xff << i*8)) >> i*8; \
+ (unsigned char)((fill_val & ((type)0xff << i*8)) >> i*8); \
}
/* Set the fill value parameter in cd_values[] for unsigned integer type */
@@ -427,13 +427,13 @@ H5Z_class_t H5Z_SCALEOFFSET[1] = {{
{ \
if(sizeof(type)==sizeof(int)) \
for(i = 0; i < sizeof(int); i++) \
- ((unsigned char *)minval)[i] = (*(int *)&min & ((int)0xff << i*8)) >> i*8; \
+ ((unsigned char *)minval)[i] = (unsigned char)((*(int *)&min & ((int)0xff << i*8)) >> i*8); \
else if(sizeof(type)==sizeof(long)) \
for(i = 0; i < sizeof(long); i++) \
- ((unsigned char *)minval)[i] = (*(long *)&min & ((long)0xff << i*8)) >> i*8; \
+ ((unsigned char *)minval)[i] = (unsigned char)((*(long *)&min & ((long)0xff << i*8)) >> i*8); \
else if(sizeof(type)==sizeof(long_long)) \
for(i = 0; i < sizeof(long_long); i++) \
- ((unsigned char *)minval)[i] = (*(long_long *)&min & ((long_long)0xff << i*8)) >> i*8;\
+ ((unsigned char *)minval)[i] = (unsigned char)((*(long_long *)&min & ((long_long)0xff << i*8)) >> i*8);\
else \
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer dataype")\
}