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

Use strchr() instead of deprecated index() #957

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

alanc
Copy link
Contributor

@alanc alanc commented Sep 18, 2024

Fixes build failures on Solaris with gcc 14 since the legacy index() function is only defined in the legacy strings.h header, but these files only include the standard string.h header which defines the standard strchr() function.

../../../src/modules/espeak.c: In function ‘espeak_list_synthesis_voices’:
../../../src/modules/espeak.c:909:40: error: implicit declaration of function ‘index’ [-Wimplicit-function-declaration]
  909 |                                 dash = index(voicename, '-');
      |                                        ^~~~~
../../../src/modules/espeak.c:909:40: warning: incompatible implicit declaration of built-in function ‘index’ [-Wbuiltin-declaration-mismatch]

Fixes build failures on Solaris with gcc 14 since the legacy index()
function is only defined in the legacy strings.h header, but these
files only include the standard string.h header which defines the
standard strchr() function.

Signed-off-by: Alan Coopersmith <[email protected]>
@sthibaul sthibaul merged commit f5a3cf4 into brailcom:master Sep 18, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants