Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCode 2.2: warning: 'i' may be used uninitialized in this function.



I'm getting a warning from XCode 2.2 that 'i' could be used un-initialised in the function below.

bar() returns zero if it fails or returns 1 on success and sets 'i' to a value.

Is this really an issue that XCode should treat as a warning? or has XCode analysed bar() and determined that I have an issue in bar() where I might return '1' without setting 'i'?

/Users/rob/Work/atMacXt/common.c:791: warning: 'i' may be used uninitialized in this function


void foo ()
{
int i;

   if (!bar (&i))
      return;

   func (i);
}

Regards, Rob.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.