[Vala] discarded qualifiers warnings



When building any substantial Vala program, gcc outputs lots of warnings like these as it processes the C code generated by valac:

warning: assignment discards qualifiers from pointer target type
warning: passing argument 1 of ‘foo’ discards qualifiers from pointer target type

These warnings arise from const/non-const mismatches. In a large Vala program, there are so many warnings like this that programmers typically don't look at the compiler output at all, making all warnings useless.

It seems that making all these warnings go away will be a non-trivial effort for Vala and may take quite some time (I spoke briefly with Jürg about this at GUADEC a couple of months ago). In the meantime, it would be great to have a GCC option to suppress discarded qualifiers warnings. Unfortunately there is no such option today, but I just filed a GCC enhancement request:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41215

Patches welcome. :)

adam




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]