diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-11-20 20:48:16 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-11-20 20:48:16 (GMT) |
commit | e8ad6b8a8d9d93b50a65039a74e33e4f337efb70 (patch) | |
tree | 50bc01158c96ee9cae65af7a1a8fb085f78cf0eb | |
parent | e8fb73f0384940202a7ebe4a8255d9b0d2189117 (diff) | |
download | hdf5-e8ad6b8a8d9d93b50a65039a74e33e4f337efb70.zip hdf5-e8ad6b8a8d9d93b50a65039a74e33e4f337efb70.tar.gz hdf5-e8ad6b8a8d9d93b50a65039a74e33e4f337efb70.tar.bz2 |
[svn-r28426] Fixed all maybe-uninitialized warnings from gcc 5.2.
Tested on Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
serial only
-rw-r--r-- | src/H5AC.c | 4 | ||||
-rw-r--r-- | src/H5F.c | 2 | ||||
-rw-r--r-- | src/H5FS.c | 2 | ||||
-rw-r--r-- | src/H5Oproxy.c | 2 | ||||
-rw-r--r-- | test/accum.c | 2 | ||||
-rw-r--r-- | test/cache.c | 8 | ||||
-rw-r--r-- | test/dsets.c | 12 | ||||
-rw-r--r-- | test/swmr.c | 8 | ||||
-rw-r--r-- | tools/h5stat/h5stat_gentest.c | 10 |
9 files changed, 25 insertions, 25 deletions
@@ -1229,10 +1229,10 @@ H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, FILE * trace_file_ptr = NULL; #endif /* H5AC__TRACE_FILE_ENABLED */ unsigned protect_flags = H5C__NO_FLAGS_SET; - void * thing; /* Pointer to native data structure for entry */ + void *thing = NULL; /* Pointer to native data structure for entry */ hbool_t log_enabled; /* TRUE if logging was set up */ hbool_t curr_logging; /* TRUE if currently logging */ - void * ret_value = NULL; /* Return value */ + void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -1602,7 +1602,7 @@ done: herr_t H5Fstart_swmr_write(hid_t file_id) { - H5F_t *file; /* File info */ + H5F_t *file = NULL; /* File info */ size_t grp_dset_count=0; /* # of open objects: groups & datasets */ size_t nt_attr_count=0; /* # of opened named datatypes + opened attributes */ hid_t *obj_ids=NULL; /* List of ids */ @@ -191,7 +191,7 @@ H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, uint16_t nclasses, { H5FS_t *fspace = NULL; /* New free space structure */ H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */ - H5FS_t *ret_value; /* Return value */ + H5FS_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, NULL) #ifdef H5FS_DEBUG diff --git a/src/H5Oproxy.c b/src/H5Oproxy.c index f5a4315..bf1d6c8 100644 --- a/src/H5Oproxy.c +++ b/src/H5Oproxy.c @@ -175,7 +175,7 @@ H5O__cache_proxy_deserialize(const void H5_ATTR_UNUSED *_image, size_t H5_ATTR_U { H5O_proxy_t *proxy = NULL; /* Object header proxy */ H5O_proxy_cache_ud_t *udata = (H5O_proxy_cache_ud_t *)_udata; /* User data for callback */ - H5O_proxy_t *ret_value; /* Return value */ + H5O_proxy_t *ret_value = NULL; /* Return value */ FUNC_ENTER_STATIC diff --git a/test/accum.c b/test/accum.c index 5ac2aaa..3b81cca 100644 --- a/test/accum.c +++ b/test/accum.c @@ -1813,7 +1813,7 @@ test_swmr_write_big(hbool_t new) hid_t fid = -1; /* File ID */ hid_t fapl = -1; /* File access property list */ H5F_t *rf = NULL; /* File pointer */ - uint8_t *wbuf2, *rbuf; /* Buffers for reading & writing */ + uint8_t *wbuf2 = NULL, *rbuf = NULL; /* Buffers for reading & writing */ uint8_t wbuf[1024]; /* Buffer for reading & writing */ unsigned u; /* Local index variable */ #ifdef H5_HAVE_UNISTD_H diff --git a/test/cache.c b/test/cache.c index ccc2f2e..3a4a0da 100644 --- a/test/cache.c +++ b/test/cache.c @@ -17160,10 +17160,10 @@ static unsigned check_protect_retries(void) { H5F_t * file_ptr = NULL; - H5C_t *cache_ptr; - test_entry_t *base_addr; - test_entry_t *entry_ptr; - H5C_cache_entry_t * cache_entry_ptr; + H5C_t *cache_ptr = NULL; + test_entry_t *base_addr = NULL; + test_entry_t *entry_ptr = NULL; + H5C_cache_entry_t * cache_entry_ptr = NULL; int32_t type; int32_t idx; diff --git a/test/dsets.c b/test/dsets.c index 45f5cd0..5b0823b 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -9746,8 +9746,8 @@ error: static herr_t test_idx_compatible(void) { - hid_t fid; /* File id */ - hid_t did; /* Dataset id */ + hid_t fid = -1; /* File id */ + hid_t did = -1; /* Dataset id */ const char *filename = NULL; /* old test file name */ unsigned j; /* Local index variable */ H5D_chunk_index_t idx_type; /* Chunked dataset index type */ @@ -9818,10 +9818,10 @@ error: static herr_t test_unfiltered_edge_chunks(hid_t fapl) { - hid_t fid; /* File id */ - hid_t did; /* Dataset id */ - hid_t sid; /* Dataspace id */ - hid_t dcpl; /* DCPL id */ + hid_t fid = -1; /* File id */ + hid_t did = -1; /* Dataset id */ + hid_t sid = -1; /* Dataspace id */ + hid_t dcpl = -1; /* DCPL id */ hsize_t dim[2] = {4, 3}; /* Dataset dimensions */ hsize_t cdim[2] = {2, 2}; /* Chunk dimension */ char wbuf[4][3]; /* Write buffer */ diff --git a/test/swmr.c b/test/swmr.c index 38f4afb..907737b 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -3767,8 +3767,8 @@ error: static int test_file_lock_same(hid_t in_fapl) { - hid_t fid, fid2; /* File IDs */ - hid_t fapl; /* File access property list */ + hid_t fid = -1, fid2 = -1; /* File IDs */ + hid_t fapl = -1; /* File access property list */ unsigned intent; /* File access flags */ char filename[NAME_BUF_SIZE]; /* file name */ @@ -4218,8 +4218,8 @@ error: static int test_file_lock_concur(hid_t in_fapl) { - hid_t fid; /* File ID */ - hid_t fapl; /* File access property list */ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list */ char filename[NAME_BUF_SIZE]; /* file name */ pid_t childpid=0; /* Child process ID */ int child_status; /* Status passed to waitpid */ diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c index b91f52e..02bd136 100644 --- a/tools/h5stat/h5stat_gentest.c +++ b/tools/h5stat/h5stat_gentest.c @@ -352,11 +352,11 @@ error: static void gen_idx_file(const char *fname) { - hid_t fapl; /* file access property id */ - hid_t fid; /* file id */ - hid_t sid; /* space id */ - hid_t dcpl; /* dataset creation property id */ - hid_t did, did2; /* dataset id */ + hid_t fapl = -1; /* file access property id */ + hid_t fid = -1; /* file id */ + hid_t sid = -1; /* space id */ + hid_t dcpl = -1; /* dataset creation property id */ + hid_t did = -1, did2 = -1; /* dataset id */ hsize_t dims[1] = {10}; /* dataset dimension */ hsize_t c_dims[1] = {2}; /* chunk dimension */ int i; /* local index variable */ |