GNOME Bugzilla – Bug 664084
C warnings during compiling vala code
Last modified: 2018-05-17 06:08:56 UTC
=== warning.vala source code === int main(string[] args) { string[] strs = { "Hello", "World" }; stdout.printf("%s %s\n", strs[0], strs[1]); return 0; } $ valac -X -Wall warning.vala /home/penghuang/sources/test/vala/warning.vala.c: In function ‘_vala_main’: /home/penghuang/sources/test/vala/warning.vala.c:26:7: warning: variable ‘_strs_size_’ set but not used [-Wunused-but-set-variable] Wish valac can generate better code to avoid this warning.
Here are some more specific vala bug reports about C compiler warnings with Vala-generated code: Bug #609901 (assignment from incompatible pointer type) Bug #642651 (Unused static function generated) Bug #652553 (missing cast) I also see many unused and unused-but-set variables, such as the self variables. Maybe this could be an umbrella bug for this general issue?
*** This bug has been marked as a duplicate of bug 570128 ***