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

Annoying warning: statement with no effect


  • Subject: Annoying warning: statement with no effect
  • From: Jonathan Jackel <email@hidden>
  • Date: Mon, 11 Nov 2002 14:39:22 -0500

Several of the for loops in my projects are generating a compiler warning
stating "statement with no effect". But the statements all have effects and
behave as intended. For instance:

for (r = [addRowsField intValue]; r--; r == 0)
[self createNewPoint];


This statement works exactly as you would expect. The variable r starts
with the number in a field, decrements with each loop, and stops when r
reaches zero.

Anyone else seen this? What's the cure?

Jonathan
_______________________________________________
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.

  • Follow-Ups:
    • Re: Annoying warning: statement with no effect
      • From: Steve Bird <email@hidden>
    • Re: Annoying warning: statement with no effect
      • From: John Blackburn <email@hidden>
    • Re: Annoying warning: statement with no effect
      • From: Andreas Mayer <email@hidden>
    • Re: Annoying warning: statement with no effect
      • From: "Clark S. Cox III" <email@hidden>
  • Prev by Date: Re: Mystery threads eating CPU cycles
  • Next by Date: A comment and question about rendezvous...
  • Previous by thread: Re: Mystery threads eating CPU cycles
  • Next by thread: Re: Annoying warning: statement with no effect
  • Index(es):
    • Date
    • Thread