After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664084 - C warnings during compiling vala code
C warnings during compiling vala code
Status: RESOLVED DUPLICATE of bug 570128
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 619461 639017 642651 652553 684262
Blocks:
 
 
Reported: 2011-11-15 01:44 UTC by Peng Huang
Modified: 2018-05-17 06:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peng Huang 2011-11-15 01:44:48 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.
Comment 1 Murray Cumming 2012-09-05 08:31:53 UTC
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?
Comment 2 Rico Tzschichholz 2018-05-17 06:08:56 UTC

*** This bug has been marked as a duplicate of bug 570128 ***