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 643015 - KeyFile.load_from_dirs usage results in C level warnings
KeyFile.load_from_dirs usage results in C level warnings
Status: RESOLVED DUPLICATE of bug 622708
Product: vala
Classification: Core
Component: Bindings: GLib
0.11.x
Other All
: Normal minor
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-22 22:51 UTC by Sebastian Reichel
Modified: 2018-02-26 09:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Reichel 2011-02-22 22:51:26 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 **’
Comment 1 Michael 'Mickey' Lauer 2018-02-26 09:50:01 UTC

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