diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-11 19:53:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-11 19:53:30 (GMT) |
commit | bea931d73cb9db08ac220393c2cb59dd6326a8ef (patch) | |
tree | 2a3852ebb0641453477852bf0c93be5b06e99335 /src | |
parent | d9348f3763294259cc75f15bd255133c820112db (diff) | |
download | hdf5-bea931d73cb9db08ac220393c2cb59dd6326a8ef.zip hdf5-bea931d73cb9db08ac220393c2cb59dd6326a8ef.tar.gz hdf5-bea931d73cb9db08ac220393c2cb59dd6326a8ef.tar.bz2 |
[svn-r3983] Purpose:
Code cleanups
Description:
Fixed a small number of warnings and also took out the H5private.h
header from H5Ppublic.h
Platforms tested:
FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5B.c | 4 | ||||
-rw-r--r-- | src/H5FD.c | 20 | ||||
-rw-r--r-- | src/H5FDsec2.c | 2 | ||||
-rw-r--r-- | src/H5Oefl.c | 2 | ||||
-rw-r--r-- | src/H5Ppublic.h | 1 | ||||
-rw-r--r-- | src/H5V.c | 6 |
6 files changed, 17 insertions, 18 deletions
@@ -2054,8 +2054,8 @@ H5B_copy(H5F_t *f, const H5B_t *old_bt) H5B_t *ret_value = NULL; hsize_t total_native_keysize; hsize_t size; - uintn nkeys; - uintn u; + hsize_t nkeys; + hsize_t u; FUNC_ENTER(H5B_copy, NULL); @@ -1177,7 +1177,7 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size) #ifdef H5F_DEBUG if (H5DEBUG(F)) { - fprintf(H5DEBUG(F), "%s: alignment=%ld, threshold=%ld, size=%ld\n", + HDfprintf(H5DEBUG(F), "%s: alignment=%Hd, threshold=%Hd, size=%Hd\n", FUNC, file->alignment, file->threshold, size); } #endif @@ -1288,15 +1288,15 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size) ret_value = best->addr + head; #ifdef H5F_DEBUG if (H5DEBUG(F)) { - fprintf(H5DEBUG(F), - "%s: 3 pieces, begin best->addr=%ld, best->size=%ld, " - "head=%ld, size=%ld\n", + HDfprintf(H5DEBUG(F), + "%s: 3 pieces, begin best->addr=%a, best->size=%Hd, " + "head=%Hd, size=%Hd\n", FUNC, best->addr, best->size, head, size); } #endif assert(tmp); /* bark in debug mode */ if (tmp){ - if (tmp->size = best->size - head - size){ + if (tmp->size = (best->size - head - size)){ tmp->addr = best->addr + head + size; tmp->next = best->next; best->next = tmp; @@ -1406,14 +1406,14 @@ H5FD_real_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size) "driver allocation request failed"); } } else { - hsize_t wasted, tmpsize; + hsize_t wasted; haddr_t oldeoa; haddr_t eoa = (file->cls->get_eoa)(file); #ifdef H5F_DEBUG if (file->alignment * file->threshold != 1 && H5DEBUG(F)) { - fprintf(H5DEBUG(F), - "%s: alignment=%ld, threshold=%ld, size=%ld, Begin eoa=%ld\n", + HDfprintf(H5DEBUG(F), + "%s: alignment=%Hd, threshold=%Hd, size=%Hd, Begin eoa=%a\n", FUNC, file->alignment, file->threshold, size, eoa); } #endif @@ -1452,8 +1452,8 @@ H5FD_real_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size) #ifdef H5F_DEBUG if (file->alignment * file->threshold != 1 && H5DEBUG(F)) { - fprintf(H5DEBUG(F), - "%s: ret_value=%ld, wasted=%ld, Ended eoa=%ld\n", + HDfprintf(H5DEBUG(F), + "%s: ret_value=%a, wasted=%Hd, Ended eoa=%a\n", FUNC, ret_value, wasted, eoa); } #endif diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index d76ef15..edd198c 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -637,7 +637,7 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had while (size>0) { do { assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ - nbytes = HDwrite(file->fd, (void*)buf, (size_t)size); + nbytes = HDwrite(file->fd, buf, (size_t)size); } while (-1==nbytes && EINTR==errno); if (-1==nbytes) { /* error */ diff --git a/src/H5Oefl.c b/src/H5Oefl.c index de6595b..c5ac308 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -537,7 +537,7 @@ H5O_efl_write (H5F_t UNUSED *f, const H5O_efl_t *efl, haddr_t addr, "unable to seek in external raw data file"); } to_write = MIN(efl->slot[i].size-skip, size); - if ((size_t)HDwrite (fd, (void*)buf, to_write)!=to_write) { + if ((size_t)HDwrite (fd, buf, to_write)!=to_write) { HGOTO_ERROR (H5E_EFL, H5E_READERROR, FAIL, "write error in external raw data file"); } diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index d4749b0..1d3ead2 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -20,7 +20,6 @@ /* Default Template for creation, access, etc. templates */ #define H5P_DEFAULT 0 -#include "H5private.h" /* Public headers needed by this file */ #include "H5public.h" #include "H5Ipublic.h" @@ -294,7 +294,7 @@ H5V_hyper_stride(uintn n, const hsize_t *size, default: /* others */ for (i=(intn)(n-2), acc=1; i>=0; --i) { - hsize_t tmp = acc * (total_size[i+1] - size[i+1]); + tmp = acc * (total_size[i+1] - size[i+1]); assert (tmp<((hsize_t)1<<(8*sizeof(hssize_t)-1))); stride[i] = (hssize_t)tmp; /*overflow checked*/ acc *= total_size[i+1]; @@ -633,8 +633,8 @@ H5V_hyper_copy(uintn n, const hsize_t *_size, default: /* others */ for (ii=(intn)(n-2), dst_acc=1, src_acc=1; ii>=0; --ii) { - hsize_t tmp1 = dst_acc * (dst_size[ii+1] - size[ii+1]); - hsize_t tmp2 = src_acc * (src_size[ii+1] - size[ii+1]); + tmp1 = dst_acc * (dst_size[ii+1] - size[ii+1]); + tmp2 = src_acc * (src_size[ii+1] - size[ii+1]); assert (tmp1<((hsize_t)1<<(8*sizeof(hssize_t)-1))); assert (tmp2<((hsize_t)1<<(8*sizeof(hssize_t)-1))); dst_stride[ii] = (hssize_t)tmp1; /*overflow checked*/ |