• 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: "Statement with no effect" warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Statement with no effect" warning


  • Subject: Re: "Statement with no effect" warning
  • From: Chris Espinosa <email@hidden>
  • Date: Thu, 21 Jun 2007 10:16:11 -0700


On Jun 21, 2007, at 10:03 AM, Michael Stauffer wrote:

Thanks Chris.
 
I'll try using __attribute__, that sounds like a good solution.
 
The code in question is debug-build-only code that is inconvenient, but probably not impossible, to remove completely by #ifdef for release builds. I have some macros that evaluate to nothing in final release builds, and these are giving the "statement has no effect" and associated warnings.

In many cases like this, simply casting the macro result to (void) will suppress the warning.

Chris
 _______________________________________________
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: "Statement with no effect" warning
      • From: "Michael Stauffer" <email@hidden>
References: 
 >RE: "Statement with no effect" warning (From: "Michael Stauffer" <email@hidden>)

  • Prev by Date: RE: "Statement with no effect" warning
  • Next by Date: Re: Crash report doesn't list function names?
  • Previous by thread: RE: "Statement with no effect" warning
  • Next by thread: RE: "Statement with no effect" warning
  • Index(es):
    • Date
    • Thread