• 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: unused parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unused parameters


  • Subject: Re: unused parameters
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Sat, 27 Sep 2003 22:54:33 +0100

On Saturday, September 27, 2003, at 10:12 pm, Wayne Hasley wrote:

On 9/27/03 4:36 PM, "Danny Swarzman" <email@hidden> wrote:

Does anyone know how to surpress warnings about unused parameters.

CodeWarrior has a #pragma for this.

I haven't found anything about this in the docs.

I generally just cast the unused variables to void...

If you take this approach, it is common practice to write

#define UNUSED(x) ((void) (x))

...

void myfn (int param)
{
UNUSED (param);
...

just to make it clear what you are doing.

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: unused parameters (From: Wayne Hasley <email@hidden>)

  • Prev by Date: Re: sudo from nstask
  • Next by Date: Re: unused parameters
  • Previous by thread: Re: unused parameters
  • Next by thread: Correct link to UKProgressPanel 0.1.1 (was Re: broken link)
  • Index(es):
    • Date
    • Thread