GNOME Bugzilla – Bug 548442
Runtime warnings when setting Time properties
Last modified: 2008-12-17 23:48:14 UTC
I understand the type cast warning in gcc, although vala should avoid any such warnings in C. The runtime warning, however, is more problematic. $ cat test.vala public class Test:GLib.Object { public Time date { get; set; } public static void main () { Test t = new Test (); t.date = 1; } } $ $ valac test.vala test.c: In function ‘test_main’: test.c:24: warning: passing argument 2 of ‘test_set_date’ from incompatible pointer type $ ./test (process:21691): GLib-GObject-WARNING **: IA__g_object_notify: object class `Test' has no property named `date' $ If I add this attribute, [CCode (notify = false)], the runtime warning disappears. Concluding it's the same or a similar issue as with the Gtk.TreeIter. Marking this bug as depending on the bug about that.
I discovered the same in bug 534756 comment 10.
2008-09-29 Jürg Billeter <j@bitron.ch> * gobject/valaccodegenerator.vala: Don't use g_object_notify for non-GObject properties, fixes bug 548442 Fixed in r1815.
*** Bug 548430 has been marked as a duplicate of this bug. ***