diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-21 14:08:13 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-21 14:08:13 (GMT) |
commit | d1117ac78c622908b4749218a991388d64f01f31 (patch) | |
tree | 35162f14a1505ff84ce9c088d270019991869896 /src/H5Dcontig.c | |
parent | afd35119824638eeefc90c07286e49a45746e186 (diff) | |
download | hdf5-d1117ac78c622908b4749218a991388d64f01f31.zip hdf5-d1117ac78c622908b4749218a991388d64f01f31.tar.gz hdf5-d1117ac78c622908b4749218a991388d64f01f31.tar.bz2 |
[svn-r19655] Description:
Bring r19654 from trunk to 1.8 branch:
Bring Coverity revisions from branch back to trunk, and clean up some other
misc. compiler warnings also.
r19500:
Fix coverity items 1446 and 1447. Moved up calls to memset in test_cont in
ohdr.c so the test never tries to close uninitialized locations.
r19501:
Fix coverity items 1398-1445. Various uninitialized variable errors in fheap.c.
r19502:
Fixed coverity issue 579 and some additional warnings in the file as well.
r19503:
Bug fix: This fix addressed the "RESOURCE_LEAK" problems #789 and 790, run 26
r19504:
minor mods to try to keep coverity from flagging false positives.
r19505:
Fixed coverity issues 566 - 571. Declared variables that are passed to functions that use them as arrays to be arrays of size 1.
Tested on:
Mac OS X/32 10.6.4 (amazon) w/debug, production & parallel
(h5committested on coverity branch)
Diffstat (limited to 'src/H5Dcontig.c')
-rw-r--r-- | src/H5Dcontig.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index 9b4f338..9a6e08f 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -1301,7 +1301,7 @@ H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, void *reclaim_buf = NULL; /* Buffer for reclaiming data */ H5S_t *buf_space = NULL; /* Dataspace describing buffer */ hid_t buf_sid = -1; /* ID for buffer dataspace */ - hsize_t buf_dim; /* Dimension for buffer */ + hsize_t buf_dim[1] = {0}; /* Dimension for buffer */ hbool_t is_vlen = FALSE; /* Flag to indicate that VL type conversion should occur */ hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1382,10 +1382,10 @@ H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, buf_size = nelmts * max_dt_size; /* Create dataspace for number of elements in buffer */ - buf_dim = nelmts; + buf_dim[0] = nelmts; /* Create the space and set the initial extent */ - if(NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL))) + if(NULL == (buf_space = H5S_create_simple((unsigned)1, buf_dim, NULL))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") /* Atomize */ @@ -1441,10 +1441,10 @@ H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, mem_nbytes = nelmts * mem_dt_size; /* Adjust size of buffer's dataspace dimension */ - buf_dim = nelmts; + buf_dim[0] = nelmts; /* Adjust size of buffer's dataspace */ - if(H5S_set_extent_real(buf_space, &buf_dim) < 0) + if(H5S_set_extent_real(buf_space, buf_dim) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to change buffer dataspace size") } /* end if */ else |