From e6ea8fabea982d4e0985aadea4ce862814706fea Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Tue, 12 Sep 2017 07:29:07 +0100 Subject: [PATCH] Initialise ending in RemoveEnding. Clang static analysis reports this as several 'Result of operation is garbage or undefined' errors, when `ending` has not been set due to no matching endings. --- src/libespeak-ng/dictionary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index ccb154b6..40d06c88 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -3003,7 +3003,7 @@ int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy) int end_flags; const char *p; int len; - char ending[50]; + char ending[50] = {0}; // these lists are language specific, but are only relevent if the 'e' suffix flag is used static const char *add_e_exceptions[] = {