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 548442 - Runtime warnings when setting Time properties
Runtime warnings when setting Time properties
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.3.x
Other All
: Normal normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
: 548430 (view as bug list)
Depends on: 548430
Blocks:
 
 
Reported: 2008-08-19 12:42 UTC by Philip Van Hoof
Modified: 2008-12-17 23:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Van Hoof 2008-08-19 12:42:44 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.
Comment 1 Sebastian Pölsterl 2008-09-28 09:57:10 UTC
I discovered the same in bug 534756 comment 10.
Comment 2 Jürg Billeter 2008-09-29 21:44:56 UTC
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.
Comment 3 Jürg Billeter 2008-12-17 23:48:14 UTC
*** Bug 548430 has been marked as a duplicate of this bug. ***