__USE_INLINE__
Posted: Thu Aug 11, 2011 9:38 am
The OS3 BOOPSI example RKMButClass.c, i worked on,now compiles and works under OS4
I am now trying to get rid of pointer warnings
I do use
#define __USE_INLINE__
So in 'main' i have
struct Gadget *integer, *but;
if (integer = (struct Gadget *)NewObject(NULL,
"strgclass",
GA_ID, 1L,
; ....
TAG_END))
{
if (but = (struct Gadget *)NewObject(rkmbutcl,
...
{
and at cleanup:
DisposeObject(but);
DisposeObject(integer);
I get the warning: passing argument 2 of 'IIntuition->DisposeObject' from incompatible pointer type
for both lines
Looking into the file RKMButClass.e
produced using gcc's -E option
i find the same declarations for but and integer
and the follosing 'Dispose' lines
IIntuition->DisposeObject((but));
IIntuition->DisposeObject((integer));
In the autodoc i found
----
intuition.library/DisposeObject intuition.library/DisposeObject
void DisposeObject(Object *obj);
INPUTS
obj - abstract pointer to a BOOPSI object returned by NewObject().
NAME
}
----
So i tried a cast
DisposeObject((struct Object *)but);
DisposeObject((struct Object *)integer);
Those lines were transformed in the .e file to
IIntuition->DisposeObject(((struct Object *)but));
IIntuition->DisposeObject(((struct Object *)integer));
but i still have exactly the same warnings.
Is it possible at all using the __USE_INLINE__ define and corresponding macro's to avoid those warnings?
I am now trying to get rid of pointer warnings
I do use
#define __USE_INLINE__
So in 'main' i have
struct Gadget *integer, *but;
if (integer = (struct Gadget *)NewObject(NULL,
"strgclass",
GA_ID, 1L,
; ....
TAG_END))
{
if (but = (struct Gadget *)NewObject(rkmbutcl,
...
{
and at cleanup:
DisposeObject(but);
DisposeObject(integer);
I get the warning: passing argument 2 of 'IIntuition->DisposeObject' from incompatible pointer type
for both lines
Looking into the file RKMButClass.e
produced using gcc's -E option
i find the same declarations for but and integer
and the follosing 'Dispose' lines
IIntuition->DisposeObject((but));
IIntuition->DisposeObject((integer));
In the autodoc i found
----
intuition.library/DisposeObject intuition.library/DisposeObject
void DisposeObject(Object *obj);
INPUTS
obj - abstract pointer to a BOOPSI object returned by NewObject().
NAME
}
----
So i tried a cast
DisposeObject((struct Object *)but);
DisposeObject((struct Object *)integer);
Those lines were transformed in the .e file to
IIntuition->DisposeObject(((struct Object *)but));
IIntuition->DisposeObject(((struct Object *)integer));
but i still have exactly the same warnings.
Is it possible at all using the __USE_INLINE__ define and corresponding macro's to avoid those warnings?