On 14-02-20 12:07 AM, Lex Trotman wrote:
Hi All,
On the off chance that we might be converging on a release I did a compile of the plugins with the usual options (-Wall -Wextra -Wno-unused-paratemers).
This was on GTK2 since many still don't work for GTK3.
The results are not too bad really :)
To summarise, other than deprecations which will be discussed below:
codenav - 2 unused variables debugger - 1 warning, useless test, probably inconsequential geanygendoc - 2 warnings, extra switch case may be consequential, unused function geanysendmail - 3 const discarded warnings multiterm - unused variable warnings in code generated by the valac, and const discarded warnings
Unused functions and variables are probably inconsequential, unless they are the result of a typo in the code meant to use them, they need a quick check and correct.
Extra switch case may indicate a typo, needs checking.
Discarded const potentially is a problem, it may indicate that something may try to modify literal strings, which may have undefined behaviour. Sometimes library headers use char* when they should have const char*, this is annoying, but it can usually be worked around. But must be checked, including the ones generated by the Vala compiler.
No it mustn't :) I won't check or fix warnings in Vala's generated code, at least not as part of the Geany project. If it helps you out, just pretend the generated C code is like GCC's generated ASM code and that you assembled this code with very strong warnings and someone suggested you sift through GCC's generated assembler to verify each warning. I'm not opposed to any patches you provide though, if you'd like to read through the generated code and provide patches upstream and if they require changes in the plugin, apply them.
IMO, we should just disable warnings on Vala's generated code altogether and rely only on the Vala warnings. Anything else is a Vala bug and not our problem. I would've done this long ago but I'm not sure how to properly/portably disable warnings for a particular target in Autotools.
The details are at http://pastebin.geany.org/76dfx/
Since this is with GTK2 there are no GTK deprecation warnings (except in Vala, which seems to have decided that the whole of GTK2 is deprecated), [snip]
The GTK2 Vala binding is deprecated, same as the GTK2 C API/library. There is a compiler flag for Valac to make it disable the deprecation warnings, if that is desirable.
Cheers, Matthew Brush