diff options
| -rw-r--r-- | meta-oe/recipes-support/espeak/espeak.inc | 1 | ||||
| -rw-r--r-- | meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch | 56 |
2 files changed, 57 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/espeak/espeak.inc b/meta-oe/recipes-support/espeak/espeak.inc index 97873f22e8..60b3f73c81 100644 --- a/meta-oe/recipes-support/espeak/espeak.inc +++ b/meta-oe/recipes-support/espeak/espeak.inc | |||
| @@ -4,6 +4,7 @@ LICENSE = "GPLv3" | |||
| 4 | LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c" | 4 | LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c" |
| 5 | 5 | ||
| 6 | SRC_URI = "http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip \ | 6 | SRC_URI = "http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip \ |
| 7 | file://gcc-narrowing-warning-fix.patch \ | ||
| 7 | " | 8 | " |
| 8 | SRC_URI[md5sum] = "cadd7482eaafe9239546bdc09fa244c3" | 9 | SRC_URI[md5sum] = "cadd7482eaafe9239546bdc09fa244c3" |
| 9 | SRC_URI[sha256sum] = "bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659" | 10 | SRC_URI[sha256sum] = "bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659" |
diff --git a/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch b/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch new file mode 100644 index 0000000000..2a9b4607d9 --- /dev/null +++ b/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | From f09c83640b9173552fd9277c3a48619b903fa436 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Reece H. Dunn" <msclrhd@gmail.com> | ||
| 3 | Date: Wed, 20 Jan 2016 20:48:29 +0000 | ||
| 4 | Subject: [PATCH] Fix GCC -Wnarrowing warnings. | ||
| 5 | |||
| 6 | --- | ||
| 7 | src/tr_languages.cpp | 7 ++++--- | ||
| 8 | src/translate.h | 2 +- | ||
| 9 | 2 files changed, 5 insertions(+), 4 deletions(-) | ||
| 10 | |||
| 11 | Index: espeak-1.48.04-source/src/tr_languages.cpp | ||
| 12 | =================================================================== | ||
| 13 | --- espeak-1.48.04-source.orig/src/tr_languages.cpp | ||
| 14 | +++ espeak-1.48.04-source/src/tr_languages.cpp | ||
| 15 | @@ -198,8 +198,8 @@ static const unsigned short chars_ignore | ||
| 16 | 0x200d, 1, // zero width joiner | ||
| 17 | 0, 0 }; | ||
| 18 | |||
| 19 | -const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8 | ||
| 20 | - | ||
| 21 | +const unsigned char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8 | ||
| 22 | +const unsigned char utf8_null[] = { 0 }; // null string, UTF-8 | ||
| 23 | |||
| 24 | static Translator* NewTranslator(void) | ||
| 25 | {//=================================== | ||
| 26 | @@ -296,7 +296,7 @@ static const char transpose_map_latin[] | ||
| 27 | tr->langopts.replace_chars = NULL; | ||
| 28 | tr->langopts.ascii_language[0] = 0; // Non-Latin alphabet languages, use this language to speak Latin words, default is English | ||
| 29 | tr->langopts.alt_alphabet_lang = L('e','n'); | ||
| 30 | - tr->langopts.roman_suffix = ""; | ||
| 31 | + tr->langopts.roman_suffix = utf8_null; | ||
| 32 | |||
| 33 | SetLengthMods(tr,201); | ||
| 34 | // tr->langopts.length_mods = length_mods_en; | ||
| 35 | @@ -758,7 +758,7 @@ Translator *SelectTranslator(const char | ||
| 36 | tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2; | ||
| 37 | tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_ORDINAL; | ||
| 38 | tr->langopts.numbers2 = NUM2_ORDINAL_NO_AND; | ||
| 39 | - tr->langopts.roman_suffix = string_ordinal; | ||
| 40 | + tr->langopts.roman_suffix = utf8_null; | ||
| 41 | } | ||
| 42 | else | ||
| 43 | if(name2 == L_pap) | ||
| 44 | Index: espeak-1.48.04-source/src/translate.h | ||
| 45 | =================================================================== | ||
| 46 | --- espeak-1.48.04-source.orig/src/translate.h | ||
| 47 | +++ espeak-1.48.04-source/src/translate.h | ||
| 48 | @@ -545,7 +545,7 @@ typedef struct { | ||
| 49 | int decimal_sep; | ||
| 50 | int max_digits; // max number of digits which can be spoken as an integer number (rather than individual digits) | ||
| 51 | const char *ordinal_indicator; // UTF-8 string | ||
| 52 | - const char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an) | ||
| 53 | + const unsigned char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an) | ||
| 54 | |||
| 55 | // bit 0, accent name before the letter name, bit 1 "capital" after letter name | ||
| 56 | int accents; | ||
