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 526102 - The G_TYPE_CHECK_INSTANCE_CAST() macro does not emit a warning if an instance structure is not of the expected type
The G_TYPE_CHECK_INSTANCE_CAST() macro does not emit a warning if an instance...
Status: RESOLVED NOTABUG
Product: glib
Classification: Platform
Component: gobject
2.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-04-04 05:19 UTC by Areg Beketovski
Modified: 2008-06-10 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The test case reproducing the bug (1.31 KB, text/plain)
2008-04-04 05:21 UTC, Areg Beketovski
Details

Description Areg Beketovski 2008-04-04 05:19:53 UTC
According to the specification of the macro G_TYPE_CHECK_INSTANCE_CAST() "Checks that instance is an instance of the type identified by g_type and emits a warning if this is not the case." Whenever instance structure type does not match the type id, passed in for a second parameter, the warning is not get emitted.


The detailed bug description can be found at: 

http://linuxtesting.org/results/report?num=D0074
Comment 1 Areg Beketovski 2008-04-04 05:21:17 UTC
Created attachment 108589 [details]
The test case reproducing the bug
Comment 2 Tim Janik 2008-06-10 12:02:02 UTC
G_TYPE_CHECK_INSTANCE_CAST() does generate a warning.
G_TYPE_CHECK_INSTANCE_TYPE() does not warn.
your test uses G_TYPE_CHECK_INSTANCE_TYPE() instead of G_TYPE_CHECK_INSTANCE_CAST(), so needs to be fixed.