summaryrefslogtreecommitdiffstats
path: root/src/H5SM.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-13 17:41:25 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-11-13 17:41:25 (GMT)
commit408d2087108b95256a39ea4d2c547ee64b92c1ec (patch)
treef93a22406e70f50bc7c87456452d9ac75c915b2a /src/H5SM.c
parent918e1a879d95114929a3f7abf1952bc6dd90c9d1 (diff)
downloadhdf5-408d2087108b95256a39ea4d2c547ee64b92c1ec.zip
hdf5-408d2087108b95256a39ea4d2c547ee64b92c1ec.tar.gz
hdf5-408d2087108b95256a39ea4d2c547ee64b92c1ec.tar.bz2
Explicitly initialize `type_flags`; the compiler does not realize that
it is set before use by passing it as a reference to another function.
Diffstat (limited to 'src/H5SM.c')
-rw-r--r--src/H5SM.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 290e575..91ef98b 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -313,7 +313,7 @@ ssize_t
H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
{
size_t x;
- unsigned type_flag;
+ unsigned type_flag = 0;
ssize_t ret_value = FAIL;
FUNC_ENTER_NOAPI_NOINIT
@@ -353,7 +353,7 @@ htri_t
H5SM_type_shared(H5F_t *f, unsigned type_id)
{
H5SM_master_table_t *table = NULL; /* Shared object master table */
- unsigned type_flag; /* Flag corresponding to message type */
+ unsigned type_flag = 0; /* Flag corresponding to message type */
size_t u; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */