diff --git a/configure.ac b/configure.ac index d0d80243..feb6046f 100644 --- a/configure.ac +++ b/configure.ac @@ -275,6 +275,7 @@ dnl dnl Reference: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html dnl ================================================================ +AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CFLAGS="-Wmissing-prototypes $CFLAGS"]) AX_CHECK_COMPILE_FLAG([-Wreturn-type], [CFLAGS="-Wreturn-type $CFLAGS"]) AX_CHECK_COMPILE_FLAG([-Wunused], [CFLAGS="-Wunused $CFLAGS"]) AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [CFLAGS="-Wunused-parameter $CFLAGS"]) diff --git a/tests/api.c b/tests/api.c index b017e6ec..985b2543 100644 --- a/tests/api.c +++ b/tests/api.c @@ -34,7 +34,7 @@ // region espeak_Initialize -void +static void test_espeak_terminate_without_initialize() { printf("testing espeak_Terminate without espeak_Initialize\n"); @@ -49,7 +49,7 @@ test_espeak_terminate_without_initialize() assert(p_decoder == NULL); } -void +static void test_espeak_initialize() { printf("testing espeak_Initialize\n"); @@ -72,7 +72,7 @@ test_espeak_initialize() // endregion // region espeak_Synth -void +static void test_espeak_synth() { printf("testing espeak_Synth\n"); @@ -103,7 +103,7 @@ test_espeak_synth() assert(p_decoder == NULL); } -void +static void test_espeak_synth_no_voices(const char *path) { printf("testing espeak_Synth in path with no voices\n"); @@ -135,7 +135,7 @@ test_espeak_synth_no_voices(const char *path) // endregion // region espeak_ng_Synthesize -void +static void test_espeak_ng_synthesize() { printf("testing espeak_ng_Synthesize\n"); @@ -166,7 +166,7 @@ test_espeak_ng_synthesize() assert(p_decoder == NULL); } -void +static void test_espeak_ng_synthesize_no_voices(const char *path) { printf("testing espeak_ng_Synthesize in path with no voices\n"); @@ -198,7 +198,7 @@ test_espeak_ng_synthesize_no_voices(const char *path) // endregion // region espeak_SetVoiceByName -void +static void test_espeak_set_voice_by_name_null_voice() { printf("testing espeak_SetVoiceByName(NULL)\n"); @@ -233,7 +233,7 @@ test_espeak_set_voice_by_name_null_voice() assert(p_decoder == NULL); } -void +static void test_espeak_set_voice_by_name_blank_voice() { printf("testing espeak_SetVoiceByName(\"\")\n"); @@ -268,7 +268,7 @@ test_espeak_set_voice_by_name_blank_voice() assert(p_decoder == NULL); } -void +static void test_espeak_set_voice_by_name_valid_voice() { printf("testing espeak_SetVoiceByName(\"de\")\n"); @@ -304,7 +304,7 @@ test_espeak_set_voice_by_name_valid_voice() assert(p_decoder == NULL); } -void +static void test_espeak_set_voice_by_name_invalid_voice() { printf("testing espeak_SetVoiceByName(\"zzz\")\n"); @@ -339,7 +339,7 @@ test_espeak_set_voice_by_name_invalid_voice() assert(p_decoder == NULL); } -void +static void test_espeak_set_voice_by_name_language_variant_intonation_parameter() { printf("testing espeak_SetVoiceByName(\"!v/Annie\") (language variant; intonation)\n"); @@ -378,7 +378,7 @@ test_espeak_set_voice_by_name_language_variant_intonation_parameter() // endregion // region espeak_SetVoiceByProperties -void +static void test_espeak_set_voice_by_properties_empty() { printf("testing espeak_SetVoiceByProperties: (none)\n"); @@ -417,7 +417,7 @@ test_espeak_set_voice_by_properties_empty() assert(p_decoder == NULL); } -void +static void test_espeak_set_voice_by_properties_blank_language() { printf("testing espeak_SetVoiceByProperties: languages=\"\"\n"); @@ -457,7 +457,7 @@ test_espeak_set_voice_by_properties_blank_language() assert(p_decoder == NULL); } -void +static void test_espeak_set_voice_by_properties_with_valid_language() { printf("testing espeak_SetVoiceByProperties: languages=\"mk\" (valid)\n"); @@ -497,7 +497,7 @@ test_espeak_set_voice_by_properties_with_valid_language() assert(p_decoder == NULL); } -void +static void test_espeak_set_voice_by_properties_with_invalid_language() { printf("testing espeak_SetVoiceByProperties: languages=\"zzz\" (invalid)\n"); diff --git a/tests/encoding.c b/tests/encoding.c index 52dffe2e..6ec97a84 100644 --- a/tests/encoding.c +++ b/tests/encoding.c @@ -26,7 +26,7 @@ #include #include -void +static void test_unbound_text_decoder() { printf("testing unbound text decoder\n"); @@ -39,7 +39,7 @@ test_unbound_text_decoder() destroy_text_decoder(decoder); } -void +static void test_unknown_encoding() { printf("testing unknown encodings\n"); @@ -57,7 +57,7 @@ test_unknown_encoding() destroy_text_decoder(decoder); } -void +static void test_us_ascii_encoding() { printf("testing US-ASCII encoding\n"); @@ -91,7 +91,7 @@ test_us_ascii_encoding() destroy_text_decoder(decoder); } -void +static void test_koi8_r_encoding() { printf("testing KOI8-R encoding\n"); @@ -117,7 +117,7 @@ test_koi8_r_encoding() destroy_text_decoder(decoder); } -void +static void test_iscii_encoding() { printf("testing ISCII encoding\n"); @@ -142,7 +142,7 @@ test_iscii_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_1_encoding() { printf("testing ISO-8859-1 encoding\n"); @@ -175,7 +175,7 @@ test_iso_8859_1_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_2_encoding() { printf("testing ISO-8859-2 encoding\n"); @@ -206,7 +206,7 @@ test_iso_8859_2_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_3_encoding() { printf("testing ISO-8859-3 encoding\n"); @@ -237,7 +237,7 @@ test_iso_8859_3_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_4_encoding() { printf("testing ISO-8859-4 encoding\n"); @@ -268,7 +268,7 @@ test_iso_8859_4_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_5_encoding() { printf("testing ISO-8859-5 encoding\n"); @@ -298,7 +298,7 @@ test_iso_8859_5_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_6_encoding() { printf("testing ISO-8859-6 encoding\n"); @@ -330,7 +330,7 @@ test_iso_8859_6_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_7_encoding() { printf("testing ISO-8859-7 encoding\n"); @@ -363,7 +363,7 @@ test_iso_8859_7_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_8_encoding() { printf("testing ISO-8859-8 encoding\n"); @@ -393,7 +393,7 @@ test_iso_8859_8_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_9_encoding() { printf("testing ISO-8859-9 encoding\n"); @@ -424,7 +424,7 @@ test_iso_8859_9_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_10_encoding() { printf("testing ISO-8859-10 encoding\n"); @@ -455,7 +455,7 @@ test_iso_8859_10_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_11_encoding() { printf("testing ISO-8859-11 encoding\n"); @@ -482,7 +482,7 @@ test_iso_8859_11_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_13_encoding() { printf("testing ISO-8859-13 encoding\n"); @@ -508,7 +508,7 @@ test_iso_8859_13_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_14_encoding() { printf("testing ISO-8859-14 encoding\n"); @@ -540,7 +540,7 @@ test_iso_8859_14_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_15_encoding() { printf("testing ISO-8859-15 encoding\n"); @@ -568,7 +568,7 @@ test_iso_8859_15_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_8859_16_encoding() { printf("testing ISO-8859-16 encoding\n"); @@ -599,7 +599,7 @@ test_iso_8859_16_encoding() destroy_text_decoder(decoder); } -void +static void test_utf_8_encoding() { printf("testing UTF-8 encoding\n"); @@ -702,7 +702,7 @@ test_utf_8_encoding() destroy_text_decoder(decoder); } -void +static void test_iso_10646_ucs_2_encoding() { printf("testing ISO-10646-UCS-2 encoding\n"); @@ -728,7 +728,7 @@ test_iso_10646_ucs_2_encoding() destroy_text_decoder(decoder); } -void +static void test_char_decoder() { printf("testing char decoder\n"); @@ -754,7 +754,7 @@ test_char_decoder() destroy_text_decoder(decoder); } -void +static void test_wchar_decoder() { printf("testing wchar_t decoder\n"); @@ -796,7 +796,7 @@ test_wchar_decoder() destroy_text_decoder(decoder); } -void +static void test_auto_decoder() { printf("testing auto decoder (UTF-8 + codepage-based fallback)\n"); @@ -846,7 +846,7 @@ test_auto_decoder() destroy_text_decoder(decoder); } -void +static void test_peekc() { printf("testing peekc\n"); diff --git a/tests/readclause.c b/tests/readclause.c index 8b465118..673f28d1 100644 --- a/tests/readclause.c +++ b/tests/readclause.c @@ -57,7 +57,7 @@ set_text(const char *text, const char *voicename) return text_decoder_decode_string(p_decoder, text, -1, ESPEAKNG_ENCODING_UTF_8); } -void +static void test_latin() { printf("testing Latin (Latn)\n"); @@ -76,7 +76,7 @@ test_latin() assert(clause_type_from_codepoint(0x2026) == (CLAUSE_SEMICOLON | CLAUSE_SPEAK_PUNCTUATION_NAME | CLAUSE_OPTIONAL_SPACE_AFTER)); } -void +static void test_latin_sentence() { printf("testing Latin (Latn) ... sentence\n"); @@ -108,7 +108,7 @@ test_latin_sentence() assert(charix_top == 0); } -void +static void test_greek() { printf("testing Greek (Grek)\n"); @@ -117,7 +117,7 @@ test_greek() assert(clause_type_from_codepoint(0x0387) == CLAUSE_SEMICOLON); } -void +static void test_armenian() { printf("testing Armenian (Armn)\n"); @@ -129,7 +129,7 @@ test_armenian() assert(clause_type_from_codepoint(0x0589) == (CLAUSE_PERIOD | CLAUSE_OPTIONAL_SPACE_AFTER)); } -void +static void test_arabic() { printf("testing Arabic (Arab)\n"); @@ -140,7 +140,7 @@ test_arabic() assert(clause_type_from_codepoint(0x06D4) == CLAUSE_PERIOD); } -void +static void test_devanagari() { printf("testing Devanagari (Deva)\n"); @@ -148,7 +148,7 @@ test_devanagari() assert(clause_type_from_codepoint(0x0964) == (CLAUSE_PERIOD | CLAUSE_OPTIONAL_SPACE_AFTER)); } -void +static void test_tibetan() { printf("testing Tibetan (Tibt)\n"); @@ -157,7 +157,7 @@ test_tibetan() assert(clause_type_from_codepoint(0x0F0E) == CLAUSE_PARAGRAPH); } -void +static void test_sinhala() { printf("testing Sinhala (Sinh)\n"); @@ -165,7 +165,7 @@ test_sinhala() assert(clause_type_from_codepoint(0x0DF4) == (CLAUSE_PERIOD | CLAUSE_OPTIONAL_SPACE_AFTER)); } -void +static void test_georgian() { printf("testing Georgian (Geor)\n"); @@ -173,7 +173,7 @@ test_georgian() assert(clause_type_from_codepoint(0x10FB) == CLAUSE_PARAGRAPH); } -void +static void test_ethiopic() { printf("testing Ethiopic (Ethi)\n"); @@ -187,7 +187,7 @@ test_ethiopic() assert(clause_type_from_codepoint(0x1368) == CLAUSE_PARAGRAPH); } -void +static void test_ideographic() { printf("testing Ideographic (Hani)\n"); @@ -196,7 +196,7 @@ test_ideographic() assert(clause_type_from_codepoint(0x3002) == (CLAUSE_PERIOD | CLAUSE_OPTIONAL_SPACE_AFTER)); } -void +static void test_fullwidth() { printf("testing Full Width\n"); @@ -209,7 +209,7 @@ test_fullwidth() assert(clause_type_from_codepoint(0xFF1F) == (CLAUSE_QUESTION | CLAUSE_OPTIONAL_SPACE_AFTER)); } -void +static void test_uts51_emoji_character() { printf("testing Emoji ... UTS-51 ED-3. emoji character\n"); @@ -245,7 +245,7 @@ test_uts51_emoji_character() assert(voice_change_name[0] == 0); } -void +static void test_uts51_text_presentation_sequence() { printf("testing Emoji ... UTS-51 ED-8a. text presentation sequence\n"); @@ -278,7 +278,7 @@ test_uts51_text_presentation_sequence() assert(voice_change_name[0] == 0); } -void +static void test_uts51_emoji_presentation_sequence() { printf("testing Emoji ... UTS-51 ED-9a. emoji presentation sequence\n"); @@ -311,7 +311,7 @@ test_uts51_emoji_presentation_sequence() assert(voice_change_name[0] == 0); } -void +static void test_uts51_emoji_modifier_sequence() { printf("testing Emoji ... UTS-51 ED-13. emoji modifier sequence\n"); @@ -341,7 +341,7 @@ test_uts51_emoji_modifier_sequence() assert(voice_change_name[0] == 0); } -void +static void test_uts51_emoji_flag_sequence() { printf("testing Emoji ... UTS-51 ED-14. emoji flag sequence\n"); @@ -374,7 +374,7 @@ test_uts51_emoji_flag_sequence() assert(voice_change_name[0] == 0); } -void +static void test_uts51_emoji_tag_sequence_emoji_character() { printf("testing Emoji ... UTS-51 ED-14a. emoji tag sequence (emoji character)\n"); @@ -450,7 +450,7 @@ test_uts51_emoji_tag_sequence_emoji_character() assert(voice_change_name[0] == 0); } -void +static void test_uts51_emoji_combining_sequence() { printf("testing Emoji ... UTS-51 ED-14b. emoji combining sequence\n"); @@ -480,7 +480,7 @@ test_uts51_emoji_combining_sequence() assert(voice_change_name[0] == 0); } -void +static void test_uts51_emoji_keycap_sequence() { printf("testing Emoji ... UTS-51 ED-14c. emoji keycap sequence\n");