Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.