• 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: Wed, 20 Jun 2007 22:53:31 -0700


On Jun 20, 2007, at 9:27 PM, Michael Stauffer wrote:

Is there a way to suppress the "statement has no effect" and the "left-hand

operand of comma _expression_ has no effect" warnings? I can't find these

documented. A old post on this list suggests "-no-undefined" but I can't

find that documented so am not sure what else it might do.


I am obligated to say that the way to suppress these warnings is to correct the source code that is triggering them.

As for the "statement with no effect" warning, it depends on what specific kind of statement it is.  Generally -Wno-unused-value will suppress this warning without turning off all of the unused (function, variable, label, parameter, value) warning with -Wno-unused.

You may also find success in adding the gcc construct __attribute__((unused)) before the statement or _expression_ that is triggering the warning.

Having the code in hand would help me be more specific, of course.

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

  • Prev by Date: Re: So I'm a n00b...
  • Next by Date: Re: So I'm a n00b...
  • Previous by thread: "Statement with no effect" warning
  • Next by thread: RE: "Statement with no effect" warning
  • Index(es):
    • Date
    • Thread