Re: [Vala] compile time errors



On Fri, Dec 23, 2011 at 9:13 PM, Dr. Amr Osman <dr3mro gmail com> wrote:

when i try to compile this small app i get these errors
=======
valac helloworld.vala --pkg gtk+-3.0 --pkg glib-2.0
helloworld.vala:20.30-20.33: warning: Argument 1: Cannot pass null to
non-null parameter type
var icons=theme.list_icons(null);
^^^^
/home/dr3mro/Desktop/hellovala/helloworld.vala.c: In function ‘gen_list’:
/home/dr3mro/Desktop/hellovala/helloworld.vala.c:196:9: warning: passing
argument 3 of ‘_vala_string_array_contains’ discards ‘const’ qualifier
from pointer target type [enabled by default]
/home/dr3mro/Desktop/hellovala/helloworld.vala.c:56:17: note: expected
‘gchar *’ but argument is of type ‘const gchar *’
/home/dr3mro/Desktop/hellovala/helloworld.vala.c:208:9: warning: passing
argument 3 of ‘_vala_string_array_contains’ discards ‘const’ qualifier
from pointer target type [enabled by default]
/home/dr3mro/Desktop/hellovala/helloworld.vala.c:56:17: note: expected
‘gchar *’ but argument is of type ‘const gchar *’
Compilation succeeded - 1 warning(s)
========
what is the solution for this ?


Hi, I will list a few points:
1) There are vala warnings and C warnings. The C warnings can be be ignored
most of the time
2) The vala warning is just a warning, your program will work anyway
3) The vala warning is actually incorrect due to an issue in the bindings,
so you can report a bug at bugzilla.gnome.org under the "vala" product

Best regards,

-- 
www.debian.org - The Universal Operating System


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