diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FSsection.c | 4 | ||||
-rw-r--r-- | src/H5HFdbg.c | 8 | ||||
-rw-r--r-- | src/H5HFdblock.c | 4 | ||||
-rw-r--r-- | src/H5HFdtable.c | 4 | ||||
-rw-r--r-- | src/H5HFhdr.c | 2 | ||||
-rw-r--r-- | src/H5HFhuge.c | 2 | ||||
-rw-r--r-- | src/H5Ocopy.c | 1 |
7 files changed, 13 insertions, 12 deletions
diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 024aa88..e6a07b7 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -1333,7 +1333,7 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", FUNC, fspace->alloc_sec HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections") /* Compute new size */ - new_size = fspace->alloc_sect_size; + H5_ASSIGN_OVERFLOW(/* To: */ new_size, /* From: */ fspace->alloc_sect_size, /* From: */ hsize_t, /* To: */ size_t); while(new_size < fspace->sect_size) new_size *= (double)fspace->expand_percent / 100.0; fspace->alloc_sect_size = new_size; @@ -1369,7 +1369,7 @@ HDfprintf(stderr, "%s: old_addr = %a, fspace->sect_addr = %a\n", FUNC, old_addr, haddr_t old_addr; /* Old address of serialized sections */ /* Compute the threshold for decreasing the sections' serialized size */ - decrease_threshold = ((size_t)fspace->alloc_sect_size * (double)fspace->shrink_percent) / 100.0; + decrease_threshold = (size_t)(((size_t)fspace->alloc_sect_size * (double)fspace->shrink_percent) / 100.0); if(fspace->alloc_sect_size > H5FS_SINFO_SIZE_DEFAULT && fspace->sect_size < decrease_threshold) { diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 8553b15..5f5c751 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -55,7 +55,7 @@ typedef struct { int indent; /* Indention amount */ int fwidth; /* Field width mount */ haddr_t dblock_addr; /* Direct block's address */ - haddr_t dblock_size; /* Direct block's size */ + hsize_t dblock_size; /* Direct block's size */ uint8_t *marker; /* 'Marker' array for free space */ size_t sect_count; /* Number of free space sections in block */ size_t amount_free; /* Amount of free space in block */ @@ -340,11 +340,11 @@ H5HF_dblock_debug_cb(const H5FS_section_info_t *_sect, void *_udata) if(sect_start < dblock_start) start = 0; else - start = sect_start - dblock_start; + H5_ASSIGN_OVERFLOW(/* To: */ start, /* From: */ (sect_start - dblock_start), /* From: */ hsize_t, /* To: */ size_t) if(sect_end > dblock_end) - end = udata->dblock_size; + H5_ASSIGN_OVERFLOW(/* To: */ end, /* From: */ udata->dblock_size, /* From: */ hsize_t, /* To: */ size_t) else - end = (sect_end - dblock_start) + 1; + H5_ASSIGN_OVERFLOW(/* To: */ end, /* From: */ ((sect_end - dblock_start) + 1), /* From: */ hsize_t, /* To: */ size_t) /* Calculate the length */ len = end - start; diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 1007412..c9322c4 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -129,7 +129,7 @@ H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblo dblock->block_off = par_iblock->block_off; dblock->block_off += hdr->man_dtable.row_block_off[par_row]; dblock->block_off += hdr->man_dtable.row_block_size[par_row] * (par_entry % hdr->man_dtable.cparam.width); - dblock->size = hdr->man_dtable.row_block_size[par_row]; + H5_ASSIGN_OVERFLOW(/* To: */ dblock->size, /* From: */ hdr->man_dtable.row_block_size[par_row], /* From: */ hsize_t, /* To: */ size_t); } /* end if */ else { /* Must be the root direct block */ @@ -434,7 +434,7 @@ HDfprintf(stderr, "%s: after updating iterator, hdr->man_iter_off = %Hu\n", FUNC if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location") HDassert(next_row < iblock->nrows); - next_size = hdr->man_dtable.row_block_size[next_row]; + H5_ASSIGN_OVERFLOW(/* To: */ next_size, /* From: */ hdr->man_dtable.row_block_size[next_row], /* From: */ hsize_t, /* To: */ size_t); /* Check for skipping over blocks */ if(min_dblock_size > next_size) { diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c index 80ec8b1..8c97b19 100644 --- a/src/H5HFdtable.c +++ b/src/H5HFdtable.c @@ -167,7 +167,7 @@ HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off); /* Check for offset in first row */ if(off < dtable->num_id_first_row) { *row = 0; - *col = off / dtable->cparam.start_block_size; + H5_ASSIGN_OVERFLOW(/* To: */ *col, /* From: */ (off / dtable->cparam.start_block_size), /* From: */ hsize_t, /* To: */ unsigned); } /* end if */ else { unsigned high_bit = H5V_log2_gen(off); /* Determine the high bit in the offset */ @@ -177,7 +177,7 @@ HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off); HDfprintf(stderr, "%s: high_bit = %u, off_mask = %Hu\n", "H5HF_dtable_lookup", high_bit, off_mask); #endif /* QAK */ *row = (high_bit - dtable->first_row_bits) + 1; - *col = (off - off_mask) / dtable->row_block_size[*row]; + H5_ASSIGN_OVERFLOW(/* To: */ *col, /* From: */ ((off - off_mask) / dtable->row_block_size[*row]), /* From: */ hsize_t, /* To: */ unsigned); } /* end else */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index adc1859..a02e8ed 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -262,7 +262,7 @@ H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr) if(u < hdr->man_dtable.max_direct_rows) { hdr->man_dtable.row_tot_dblock_free[u] = hdr->man_dtable.row_block_size[u] - H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr); - hdr->man_dtable.row_max_dblock_free[u] = hdr->man_dtable.row_tot_dblock_free[u]; + H5_ASSIGN_OVERFLOW(/* To: */ hdr->man_dtable.row_max_dblock_free[u], /* From: */ hdr->man_dtable.row_tot_dblock_free[u], /* From: */ hsize_t, /* To: */ size_t); } /* end if */ else if(H5HF_hdr_compute_free_space(hdr, u) < 0) diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c index 7675b77..da9f1a4 100644 --- a/src/H5HFhuge.c +++ b/src/H5HFhuge.c @@ -591,7 +591,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, { void *read_buf; /* Pointer to buffer for reading */ haddr_t obj_addr; /* Object's address in the file */ - hsize_t obj_size = 0; /* Object's size in the file */ + size_t obj_size = 0; /* Object's size in the file */ unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index df2ef56..a26dde2 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -38,6 +38,7 @@ #include "H5HGprivate.h" /* Global Heaps */ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ |