From 36c29c479aef8ff41888dbc2dd6c173851eecf71 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Tue, 27 Mar 2018 12:55:18 +0100 Subject: [PATCH 1/2] LookupDict2: Check if flags is not null before setting it. [msvc /analyze] --- 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 2b5f7b9e..2569e5b7 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -2822,7 +2822,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor } ix = utf8_in(&c, word); - if ((word[ix] == 0) && !IsAlpha(c)) + if (flags != NULL && (word[ix] == 0) && !IsAlpha(c)) flags[0] |= FLAG_MAX3; return word_end; From 6d25013c943bc05f1dbe409ec39e08df4f6ab322 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Tue, 27 Mar 2018 12:59:51 +0100 Subject: [PATCH 2/2] CompileReport: Don't generate a report if there are no references. [msvc /analyze] --- src/libespeak-ng/compiledata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libespeak-ng/compiledata.c b/src/libespeak-ng/compiledata.c index 7047d031..83737603 100644 --- a/src/libespeak-ng/compiledata.c +++ b/src/libespeak-ng/compiledata.c @@ -499,7 +499,7 @@ static void CompileReport(void) int procedure_num; int prev_mnemonic; - if (f_report == NULL) + if (f_report == NULL || count_references == 0) return; // make a list of all the references and sort it