summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-02-19 17:25:44 (GMT)
committerGitHub <noreply@github.com>2021-02-19 17:25:44 (GMT)
commit0a2a385accd2fc18c17bc3e36fd38f6a802e38df (patch)
treeeaa89ebb07d35516fb188b84e7a329e9a3a85bab /src/H5Shyper.c
parenta6f1b6ce5398102c579821f5f6589b00e552d6d0 (diff)
downloadhdf5-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/H5Shyper.c')
-rw-r--r--src/H5Shyper.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 3f2991f..8777661 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -1104,10 +1104,10 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
} /* end if */
/* Must be an irregular hyperslab selection */
else {
- H5S_hyper_span_t * curr_span; /* Current hyperslab span node */
- H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */
- hsize_t * abs_arr; /* Absolute hyperslab span position */
- int curr_dim; /* Temporary rank holder */
+ H5S_hyper_span_t * curr_span = NULL; /* Current hyperslab span node */
+ H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */
+ hsize_t * abs_arr; /* Absolute hyperslab span position */
+ int curr_dim; /* Temporary rank holder */
/* Set the rank of the fastest changing dimension */
ndims = iter->rank;
@@ -1296,10 +1296,10 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
} /* end if */
/* Must be an irregular hyperslab selection */
else {
- H5S_hyper_span_t * curr_span; /* Current hyperslab span node */
- H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */
- hsize_t * abs_arr; /* Absolute hyperslab span position */
- int curr_dim; /* Temporary rank holder */
+ H5S_hyper_span_t * curr_span = NULL; /* Current hyperslab span node */
+ H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */
+ hsize_t * abs_arr; /* Absolute hyperslab span position */
+ int curr_dim; /* Temporary rank holder */
/* Set the rank of the fastest changing dimension */
ndims = iter->rank;