From 921229259d58ddce801aa7ace77408f3ffc656a5 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Wed, 26 Jul 2017 19:50:03 +0100 Subject: [PATCH] Use int to store the value from GetFileLength. This fixes the clang warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] Reported by Reef Turner --- src/libespeak-ng/dictionary.c | 2 +- src/libespeak-ng/synthdata.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index d03f7d2a..febddd93 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -198,7 +198,7 @@ int LoadDictionary(Translator *tr, const char *name, int no_error) int *pw; int length; FILE *f; - unsigned int size; + int size; char fname[sizeof(path_home)+20]; strncpy(dictionary_name, name, 40); // currently loaded dictionary name diff --git a/src/libespeak-ng/synthdata.c b/src/libespeak-ng/synthdata.c index 4087197e..9bf47423 100644 --- a/src/libespeak-ng/synthdata.c +++ b/src/libespeak-ng/synthdata.c @@ -73,7 +73,7 @@ static espeak_ng_STATUS ReadPhFile(void **ptr, const char *fname, int *size, esp if (!ptr) return EINVAL; FILE *f_in; - unsigned int length; + int length; char buf[sizeof(path_home)+40]; sprintf(buf, "%s%c%s", path_home, PATHSEP, fname);