Skip navigation.
 
mlAnnoying warning: statement with no effect
FROM : Jonathan Jackel
DATE : Mon Nov 11 20:39:22 2002

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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlAnnoying warning: statement with no effect Jonathan Jackel Nov 11, 20:39
mlRe: Annoying warning: statement with no effect Clark S. Cox III Nov 11, 21:01
mlRe: Annoying warning: statement with no effect Andreas Mayer Nov 11, 21:15
mlRe: Annoying warning: statement with no effect John Blackburn Nov 11, 21:15
mlRe: Annoying warning: statement with no effect Steve Bird Nov 11, 23:03
mlConnection warning icons? Sam Griffith Nov 11, 23:32
mlRe: Connection warning icons? matt neuburg Nov 13, 15:33
mlRe: Connection warning icons? Arnaud Forgiel Nov 13, 15:46
mlRe: Connection warning icons? Erik J. Barzeski Nov 13, 16:13