Closed kloczek closed 6 months ago
Oh, annoying. This is ultimately due to weirdness in the way that Vala types map to C types, I'll have to find a workaround that doesn't upset the C compiler.
Summary stats with disabled that option on building library and test suite
[tkloczko@pers-jacek SPECS]$ rpmbuild -ba enchant.spec --quiet 2>&1 | grep -- \\[-W | sed 's/.*\[//; s/\]//' | sort | uniq -c | sort -nr
142 -Wunused-function
19 -Wunused-but-set-variable
15 -Wsign-compare
7 -Wdiscarded-qualifiers
4 -Wunused-variable
4 -Wunused-value
1 -Wincompatible-pointer-types
First two should be easy to clean 😋 If you want I can drop extracted stderr with those warigs🙄
@kloczek extracted stderr would be great, thanks!
I'm not sure what you mean by "first two"? Since the C is generated code, I won't be trying to fix all the warnings (e.g. for unused variables).
I think I have a solution for the problem with g_strfreev
thanks to one of the Vala maintainers.
I looked through the rest of the warnings. Those for unused variables are mostly caused by Vala generating C variables it doesn't use. There are quite a few in the test code, which is not a high priority for me to fix, though I should probably be building that code with warnings on; thanks! (Also, these warnings will not be new in this release.) Unused functions in test code just reflect that the same C++ headers are reused in multiple compilation units.
In short, I don't see anything here that really needs fixing other than the g_strfreev
binding.
Fix in https://github.com/rrthomas/enchant master. Thanks for the report. The fix will be in the next release, but I don't think it warrants a release in itself as there's no real problem here.
I have tested the fix with the compiler warning flags you gave.
With latest glibc snapshot when project is build with
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3
in $CFLAGS some warnings are turned into errors. In this case problem is with[-Wincompatible-pointer-types]