Strictly speaking, we are not supposed to use memcmp to compare strings
since we are not supposed to read beyond \0, which memcmp is supposed to
potentially do. Sanitizers would warn about it, and using strncmp happens to
provide the proper semantic while being not really slower, so better
just use them.
code cleanup: Check all local includes with include-what-you-use
Going through files in src/libespeak-ng/, include-what-you-use removed a
few unnecessary includes and included explanations on why a certain
header should be included. This makes tracking globals and dependencies easier.
Running the codebase through IWYU should be repeated after each major
code restIncludes to standard c library weren't checked to avoid
breaking builds with other platforms.
See https://github.com/include-what-you-use/include-what-you-use
No modification was being done to buf after the copy of filepath.
It was just being passed to fopen. As such the copy is redundant,
and can lead to buffer overflow issues if the specified filepath
is larger than buf.
This reverts commits 0cc0300328 to
38d15f8f90.
The 0cc03003 commit breaks MBROLA voice support. As such, there
may be other breakages in those commits.