GNOME Bugzilla – Bug 643015
KeyFile.load_from_dirs usage results in C level warnings
Last modified: 2018-02-26 09:50:01 UTC
here is the testcode (also available @ http://paste.debian.net/108547): int main(string[] args) { string path; string[] dirs = { Environment.get_user_config_dir(), "/etc" }; try { var cfg = new KeyFile(); cfg.load_from_dirs("example", dirs, out path, KeyFileFlags.NONE); } catch(FileError e) { error("FileError: %s", e.message); } catch(KeyFileError e) { error("KeyFileError: %s", e.message); } return 0; } and here is the valac output: $ valac test.vala /home/sre/test.vala.c: In function ‘_vala_main’: /home/sre/test.vala.c:46: warning: passing argument 3 of ‘g_key_file_load_from_dirs’ from incompatible pointer type /usr/include/glib-2.0/glib/gkeyfile.h:70: note: expected ‘const gchar **’ but argument is of type ‘gchar **’
*** This bug has been marked as a duplicate of bug 622708 ***