diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-04 01:31:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-04 01:31:33 (GMT) |
commit | 2725a29b0e7158b8b0d8dfd7d3ab42126db6f235 (patch) | |
tree | 6e90df8ecc503ee396f666ac1ec8466913cde260 /src/H5Fcontig.c | |
parent | 85c19fc0bac344a477066c8239c3a8f935abd75c (diff) | |
download | hdf5-2725a29b0e7158b8b0d8dfd7d3ab42126db6f235.zip hdf5-2725a29b0e7158b8b0d8dfd7d3ab42126db6f235.tar.gz hdf5-2725a29b0e7158b8b0d8dfd7d3ab42126db6f235.tar.bz2 |
[svn-r3236] Purpose:
Clean up code.
Description:
Cleaned up various compiler warnings.
Platforms tested:
FreeBSD 4.2 (hawkwind)
Diffstat (limited to 'src/H5Fcontig.c')
-rw-r--r-- | src/H5Fcontig.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c index 385eb0b..14fdda7 100644 --- a/src/H5Fcontig.c +++ b/src/H5Fcontig.c @@ -72,7 +72,8 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp /* If entire read is within the sieve buffer, read it from the buffer */ if(addr>=sieve_start && contig_end<sieve_end) { /* Grab the data out of the buffer */ - HDmemcpy(buf,f->shared->sieve_buf+(addr-sieve_start),size); + assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ + HDmemcpy(buf,f->shared->sieve_buf+(addr-sieve_start),(size_t)size); } /* end if */ /* Entire request is not within this data sieve buffer */ else { @@ -134,7 +135,8 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp f->shared->sieve_dirty=0; /* Grab the data out of the buffer (must be first piece of data in buffer ) */ - HDmemcpy(buf,f->shared->sieve_buf,size); + assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ + HDmemcpy(buf,f->shared->sieve_buf,(size_t)size); } /* end else */ } /* end else */ } /* end if */ @@ -174,7 +176,8 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp f->shared->sieve_dirty=0; /* Grab the data out of the buffer (must be first piece of data in buffer ) */ - HDmemcpy(buf,f->shared->sieve_buf,size); + assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ + HDmemcpy(buf,f->shared->sieve_buf,(size_t)size); } /* end else */ } /* end else */ } /* end if */ @@ -234,7 +237,8 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, /* If entire write is within the sieve buffer, write it to the buffer */ if(addr>=sieve_start && contig_end<sieve_end) { /* Grab the data out of the buffer */ - HDmemcpy(f->shared->sieve_buf+(addr-sieve_start),buf,size); + assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ + HDmemcpy(f->shared->sieve_buf+(addr-sieve_start),buf,(size_t)size); /* Set sieve buffer dirty flag */ f->shared->sieve_dirty=1; @@ -301,7 +305,8 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, } /* Grab the data out of the buffer (must be first piece of data in buffer) */ - HDmemcpy(f->shared->sieve_buf,buf,size); + assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ + HDmemcpy(f->shared->sieve_buf,buf,(size_t)size); /* Set sieve buffer dirty flag */ f->shared->sieve_dirty=1; @@ -342,7 +347,8 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, } /* Grab the data out of the buffer (must be first piece of data in buffer) */ - HDmemcpy(f->shared->sieve_buf,buf,size); + assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ + HDmemcpy(f->shared->sieve_buf,buf,(size_t)size); /* Set sieve buffer dirty flag */ f->shared->sieve_dirty=1; |