• 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: Strange Warning on i386 build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Warning on i386 build


  • Subject: Re: Strange Warning on i386 build
  • From: Stephane Sudre <email@hidden>
  • Date: Mon, 30 Jan 2006 16:22:10 +0100


On 27 janv. 06, at 19:32, Eric Albert wrote:

On Jan 27, 2006, at 9:31 AM, Stephane wrote:

When building a project, XCode (gcc) is issuing a strange warning.

This line:

if (inet_ntop(AF_INET6,&address_,tBuffer,128)!=NULL)

is leading to this warning:

warning: comparison between pointer and integer

for the i386 compilation (the ppc (GCC 3.3) build works fine).

Yet, the inet.h file states:

const char	*inet_ntop(int, const void *, char *, size_t);

A const char * or NULL are not compatible as pointers in the Intel world?

Maybe I'm missing something obvious.

Sounds like you might have a
#define NULL 0
somewhere in your code. The system defines NULL as a 0-valued pointer, but you can override it.

Hum, yes but no.

I only include the following headers:

#include <netinet/in.h>

#import <Foundation/Foundation.h>

#include <sys/socket.h>

At one point, NULL is indeed defined as 0 but:

- only when it's not yet defined

- this re-declaration is not seen by the problematic file (no direct or indirect includes)


_______________________________________________ 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
References: 
 >Strange Warning on i386 build (From: Stephane <email@hidden>)
 >Re: Strange Warning on i386 build (From: Eric Albert <email@hidden>)

  • Prev by Date: Re: Attaching breakpoints to templated functions
  • Next by Date: Re: Programatically determining @executable_path
  • Previous by thread: Re: Strange Warning on i386 build
  • Next by thread: Build with gcc3.3 in Xcode 2.c
  • Index(es):
    • Date
    • Thread