• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Techniques to suppress "unused member variable" Clang warnings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Techniques to suppress "unused member variable" Clang warnings?


  • Subject: Re: Techniques to suppress "unused member variable" Clang warnings?
  • From: Jim Thomason <email@hidden>
  • Date: Thu, 3 Feb 2011 16:51:37 -0600

> There are a few erroneous warnings that Clang can't seem to deal with. I
> have one that occurs again and again, and I'd like to suppress them but
> can't figure out how.
>
>    "Instance variable 'someVariable' in class 'SomeClass' is never used by
> the
>    methods in its @implementation (although it may be used by category
> methods)"

Could you just do something simple like explicitly assign to it in init?

-(id) init {
  if (self = [super init]) {
    someVariable = nil;
    //continue on
  }
  return self;
}

-Jim.....
 _______________________________________________
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

  • Follow-Ups:
    • Re: Techniques to suppress "unused member variable" Clang warnings?
      • From: James Bucanek <email@hidden>
References: 
 >Techniques to suppress "unused member variable" Clang warnings? (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: Techniques to suppress "unused member variable" Clang warnings?
  • Next by Date: Re: Techniques to suppress "unused member variable" Clang warnings?
  • Previous by thread: Re: Techniques to suppress "unused member variable" Clang warnings?
  • Next by thread: Re: Techniques to suppress "unused member variable" Clang warnings?
  • Index(es):
    • Date
    • Thread