• 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: Booleans not being set
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booleans not being set


  • Subject: Re: Booleans not being set
  • From: Steve Checkoway <email@hidden>
  • Date: Sun, 8 Feb 2009 16:11:24 -0800


On Feb 7, 2009, at 1:43 AM, Erg Consultant wrote:

I have a simple C routine which looks roughly like this:

I'd like to know why this is happening as a routine returning true even when I set the return value to false is not the way code nor a compiler should behave.


Have you tried changing it to

Boolean IsOnline( char *host, Boolean checkConnection )
{
        Boolean result = false;
        return result;
}

and checking if it still returns true? While compiler bugs are certainly possible, it seems pretty unlikely. Note that in addition to project and target settings, individual files can have compiler flags. It'd be worth looking at the actual build commands to ensure that no optimization flags are being passed to the compiler.

--
Steve Checkoway

    "Anyone who says that the solution is to educate the users
    hasn't ever met an actual user." -- Bruce Schneier




Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Booleans not being set
      • From: Andreas Grosam <email@hidden>
References: 
 >Booleans not being set (From: Erg Consultant <email@hidden>)

  • Prev by Date: Re: Help on Stack trace
  • Next by Date: Re: Help on Stack trace
  • Previous by thread: Re: Booleans not being set
  • Next by thread: Re: Booleans not being set
  • Index(es):
    • Date
    • Thread