Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (MBROLA_BIN)
endif(MBROLA_BIN)
if (SONIC_LIB AND SONIC_INC)
set(HAVE_LIBSONIC ON)
else()
elseif(USE_LIBSONIC)
FetchContent_Declare(sonic-git
GIT_REPOSITORY https://github.com/waywardgeek/sonic.git
GIT_TAG fbf75c3d6d846bad3bb3d456cbc5d07d9fd8c104
Expand Down
2 changes: 1 addition & 1 deletion src/libespeak-ng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ target_link_libraries(espeak-ng PRIVATE espeak-ng-config ucd)
if (NOT MSVC)
target_link_libraries(espeak-ng PRIVATE m)
endif()
target_link_libraries(espeak-ng PUBLIC espeak-include)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line using PUBLIC causes errors when building for linux aarch64. I have spent half a day to figure it out.

https://github.com/rhasspy/espeak-ng/tree/master/src/include/compat
The above folder contains many header files that share the same name with the standard library headers. It is really bad to also include it in the header search path.

(It is even worse to name them using standard library header filenames.)

target_link_libraries(espeak-ng PRIVATE espeak-include)

if (MINGW)
target_link_options(espeak-ng PRIVATE "-static-libstdc++" "-static")
Expand Down
2 changes: 1 addition & 1 deletion src/libespeak-ng/numbers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
if (prev_thousands == 0) {
if ((decimal_point == 0) && (ordinal == 0)) {
// Look for special pronunciation for this number in isolation (LANG=kl)
sprintf(string, "_%dn", value);
sprintf(string, "_%ldn", value);
if (Lookup(tr, string, ph_out))
return 1;
}
Expand Down
2 changes: 2 additions & 0 deletions src/libespeak-ng/voices.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,10 @@ voice_t *LoadVoice(const char *vname, int control)
char phonemes_name[40] = "";
const char *language_type;
char buf[sizeof(path_home)+30];
#if USE_MBROLA
char name1[40];
char name2[80];
#endif

int pitch1;
int pitch2;
Expand Down