• 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: #pragma doesn't
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #pragma doesn't


  • Subject: Re: #pragma doesn't
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 5 Jan 2010 17:47:24 -0500
  • Organization: Rogue Research Inc.

On 12/23/09 8:21 PM, Charlie Dickman said:

> According to the documentation #pragma unused (iVar) is supposed to
>suppress any unused variable warning for iVar but it doesn't. Anybody
>know what gives?

The most portable way to suppress the unused waring is the following:

- (IBAction)handleButton:(id)inSender
{
	(void)inSender;
	...
}

This works in C, C++, Obj-C, CodeWarrior, gcc, clang, Visual Studio,
etc., etc.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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

  • Prev by Date: NSDatePickerCell
  • Next by Date: Re: File encoding for files ported between Mac and Windows?
  • Previous by thread: NSDatePickerCell
  • Next by thread: Re: #pragma doesn't
  • Index(es):
    • Date
    • Thread