diff options
author | Sean McBride <sean@rogue-research.com> | 2021-02-19 17:25:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-19 17:25:44 (GMT) |
commit | 0a2a385accd2fc18c17bc3e36fd38f6a802e38df (patch) | |
tree | eaa89ebb07d35516fb188b84e7a329e9a3a85bab /src/H5HFman.c | |
parent | a6f1b6ce5398102c579821f5f6589b00e552d6d0 (diff) | |
download | hdf5-0a2a385accd2fc18c17bc3e36fd38f6a802e38df.zip hdf5-0a2a385accd2fc18c17bc3e36fd38f6a802e38df.tar.gz hdf5-0a2a385accd2fc18c17bc3e36fd38f6a802e38df.tar.bz2 |
Fixed uninitialized warnings (#360)
* Fixed all -Wsometimes-uninitialized warnings by initializing variables
* Fixed all -Wconditional-uninitialized warnings by initializing variables
* Commit alignment changes from running bin/format_source with clang
version 10.0.1.
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r-- | src/H5HFman.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c index b516790..427be00 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -297,9 +297,9 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * * H5AC__NO_FLAGS_SET or * H5AC__READ_ONLY_FLAG */ - haddr_t dblock_addr; /* Direct block address */ + haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */ size_t dblock_size; /* Direct block size */ - unsigned dblock_cache_flags; /* Flags for unprotecting direct block */ + unsigned dblock_cache_flags = 0; /* Flags for unprotecting direct block */ hsize_t obj_off; /* Object's offset in heap */ size_t obj_len; /* Object's length in heap */ size_t blk_off; /* Offset of object in block */ @@ -545,9 +545,9 @@ done: herr_t H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id) { - H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */ - H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */ - hbool_t did_protect; /* Whether we protected the indirect block or not */ + H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */ + H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */ + hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */ hsize_t obj_off; /* Object's offset in heap */ size_t obj_len; /* Object's length in heap */ size_t dblock_size; /* Direct block size */ |