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 /test | |
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
Diffstat (limited to 'test')
-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 |
4 files changed, 15 insertions, 15 deletions
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 */ |