From 408d2087108b95256a39ea4d2c547ee64b92c1ec Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 13 Nov 2019 11:41:25 -0600 Subject: Explicitly initialize `type_flags`; the compiler does not realize that it is set before use by passing it as a reference to another function. --- src/H5SM.c | 4 ++-- 1 file 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 */ -- cgit v0.12