Re: [Vala] Bug in vala



Hello,
         في ج، 10-12-2010 عند 00:40 -0300 ، كتب Erick Pérez Castellanos:
Is this a bug ???

I'm using Glib.Settings API, and specifically this:
    public bool set_strv (string key, [CCode (array_length = false)] 
string[] value)
from that class and when using as it says passing an string array as second 
parameters I'm getting a warning from the compiler:
spider_window.c: In function ‘spider_window_edit_preferences_callback’:
spider_window.c:811:3: warning: passing argument 3 of ‘g_settings_set_strv’ 
from incompatible pointer type
/usr/include/glib-2.0/gio/gsettings.h:124:25: note: expected ‘const gchar * 
const*’ but argument is of type ‘char **’

And that shouldn't happen.

"shouldn't happen" may be too strong :-)
We would like valac generated code to compile without warning, but
that's not an easy task and it doesn't bring much.

And btw, I don't see what problem there could be when passing char** to
a "const gchar* const*", maybe your compiler is a bit too paranoid? (and
maybe there is a complicated corner case I don't see).

Regards,
Abderrahim




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