Re: Warning fix
- From: Pavel Roskin <proski gnu org>
- To: Owen Taylor <otaylor redhat com>
- Cc: <gtk-devel-list gnome org>
- Subject: Re: Warning fix
- Date: Fri, 1 Jun 2001 23:41:38 -0400 (EDT)
Hi, Owen!
Thank you for prompt reply!
> > Either compare with 0 or cast it to (void *). The same applies to
> > GTK_IS_OBJECT_CLASS.
>
> Err, GTK_IS_FOO() tests if a particular pointer is a GtkFoo.
> There is absolutely no chance that an integer is a pointer to
> a GtkFoo, so calling GTK_IS_FOO() on an integer is just an error.
Ok, I thought that GTK_OBJECT is supposed to make GtkObject from anything,
not just from any pointer.
> I think the compiler is simply catching a bug in your code.
It's not a bug, it's a bad design. I added cast to (void *) inside call to
GTK_OBJECT - the warning is gone.
--
Regards,
Pavel Roskin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]