Prevent warnings on forward struct declaration
Prevent warnings on forward struct declaration
- Subject: Prevent warnings on forward struct declaration
- From: Trygve Inda <email@hidden>
- Date: Sat, 26 Nov 2005 07:59:32 +0000
- Thread-topic: Prevent warnings on forward struct declaration
typedef void (*SomeCompletionProcPtr) (struct SomeControlBlock *dInfo);
typedef struct SomeControlBlock
{
CFURLRef mURLRef;
CFReadStreamRef mReadStreamRef;
EventLoopTimerRef mNetworkTimeoutTimerRef;
--- more stuff here ---
SomeCompletionProcPtr mCompletion;
}
SomeControlBlock, *SomeControlBlock;
So I have a struct and one of its variables is a pointer to a function whose
parameter is a pointer to the struct.
The forward declaration (with "struct" in the param list) works, but Xcode
generates a warning:
warning: its scope is only this definition or declaration, which is probably
not what you want
warning: 'struct SomeControlBlock' declared inside parameter list
I can't see a way to turn these off in the build settings (Target Info).
Any ideas? In CW no warning was given (or maybe I have long since forgotten
how I turned it off there).
Thanks,
Trygve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden