RE: "Statement with no effect" warning
RE: "Statement with no effect" warning
- Subject: RE: "Statement with no effect" warning
- From: "Michael Stauffer" <email@hidden>
- Date: Fri, 22 Jun 2007 10:38:34 -0400
- Importance: Normal
> On 6/21/07, Michael Stauffer <email@hidden> wrote:
> > > > 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.
> > > >
> > > The comma operator is a trap for the unwary. Lose it.
> >
> > Huh?
>
> The comma operator is almost never necessary, and it often
> obfuscates the code. Unless it is absolutely necessary, it is
> best avoided.
Makes me realize I didn't even know what a comma operator is, have never
used one. The "left-hand operand of comma expression..." warning I mentioned
above is generated when a debug logging statement is defined as empty for
release builds. So the comma expression is actually part of an abandoned
parameter list.
Cheers,
Michael
_______________________________________________
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