This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: warning: initialization makes integer from pointer without a cast


On Mar 28, 2006, at 1:41 PM, Jack Howarth wrote:
I do have one other issue to resolve in this legacy c code which I
am unclear on.

Wrong list. This list is for the development of gcc, not other software.


warning: initialization makes integer from pointer without a cast

Yup.


...for the line with a NULL. My immediate inclination was to
substitute '0' for the NULL which does indeed eliminate the
warning.

Ick.


Is there a more appropriate fix?

int i = NULL;


should be written as:

int i = 0;

but, I don't know why that wasn't obvious.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]