diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5HG.c | 4 | ||||
-rw-r--r-- | src/H5HGpkg.h | 6 | ||||
-rw-r--r-- | src/H5Oalloc.c | 2 | ||||
-rw-r--r-- | src/H5Zfletcher32.c | 4 |
4 files changed, 9 insertions, 7 deletions
@@ -182,7 +182,7 @@ HDmemset(heap->chunk, 0, size); * which was always at least H5HG_ALIGNMENT aligned then we could just * align the pointer, but this might not be the case. */ - n = H5HG_ALIGN(p - heap->chunk) - (p - heap->chunk); + n = H5HG_ALIGN(p - heap->chunk) - (size_t)(p - heap->chunk); #ifdef OLD_WAY /* Don't bother zeroing out the rest of the info in the heap -QAK */ HDmemset(p, 0, n); @@ -776,7 +776,7 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj) else heap->obj[0].size += need; HDmemmove(obj_start, obj_start + need, - heap->size - ((obj_start + need) - heap->chunk)); + heap->size - (size_t)((obj_start + need) - heap->chunk)); if(heap->obj[0].size >= H5HG_SIZEOF_OBJHDR(f)) { p = heap->obj[0].begin; UINT16ENCODE(p, 0); /*id*/ diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h index 5d4234f..274e0e3 100644 --- a/src/H5HGpkg.h +++ b/src/H5HGpkg.h @@ -77,7 +77,7 @@ H5FL_BLK_EXTERN(gheap_chunk); * largest data type is eight bytes. */ #define H5HG_ALIGNMENT 8 -#define H5HG_ALIGN(X) (H5HG_ALIGNMENT*(((X)+H5HG_ALIGNMENT-1)/ \ +#define H5HG_ALIGN(X) (size_t)(H5HG_ALIGNMENT*(((X)+H5HG_ALIGNMENT-1)/ \ H5HG_ALIGNMENT)) #define H5HG_ISALIGNED(X) ((X)==H5HG_ALIGN(X)) @@ -108,8 +108,8 @@ H5FL_BLK_EXTERN(gheap_chunk); * some overhead and each message has some overhead. The `+2' accounts for * rounding and for the free space object. */ -#define H5HG_NOBJS(f,z) (int)((((z)-H5HG_SIZEOF_HDR(f))/ \ - H5HG_SIZEOF_OBJHDR(f)+2)) +#define H5HG_NOBJS(f,z) ((((z)-H5HG_SIZEOF_HDR(f))/ \ + H5HG_SIZEOF_OBJHDR(f)+2)) /****************************/ diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 5c00fb2..76f392d 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -762,7 +762,7 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new size_t idx; /* Message number */ uint8_t *p = NULL; /*ptr into new chunk */ H5O_cont_t *cont = NULL; /*native continuation message */ - unsigned chunkno; /* Chunk allocated */ + size_t chunkno; /* Chunk allocated */ haddr_t new_chunk_addr; unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c index 7f67015..2ee69d1 100644 --- a/src/H5Zfletcher32.c +++ b/src/H5Zfletcher32.c @@ -137,9 +137,11 @@ H5Z_filter_fletcher32 (unsigned flags, size_t UNUSED cd_nelmts, const unsigned U /* Compute checksum (can't fail) */ fletcher = H5_checksum_fletcher32(src, nbytes); - if (NULL==(dst=outbuf=H5MM_malloc(nbytes+FLETCHER_LEN))) + if (NULL == (outbuf = H5MM_malloc(nbytes + FLETCHER_LEN))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "unable to allocate Fletcher32 checksum destination buffer") + dst = (unsigned char *) outbuf; + /* Copy raw data */ HDmemcpy((void*)dst, (void*)(*buf), nbytes); |