Re: Warning fix



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]