On 3/29/06, Mike Stump <[EMAIL PROTECTED]> wrote: > 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. >
for this prepstruct bound_description { int type; WORD descr; } bnddescr[] = { BNDTYP_NULL, "null", BNDTYP_BOND, "bond", BNDTYP_ANGLE, "angle", BNDTYP_FIXED, "fixed", BNDTYP_DIHED, "dihed", BNDTYP_CTLIM, "ctlim", BNDTYP_BOUND, "bound", BNDTYP_DIST, "dist", BNDTYP_EXP, "exp", BNDTYP_OTHER, "other", BNDTYP_TRIANGLE,"triang", NULL }; for this processor replace NULL by (void *)0 this is out put of preprocessor struct bound_description { int type; char * descr; } bnddescr[] = { 1, "null", 2, "bond", 3, "angle", 3, "fixed", 4, "dihed", 5, "ctlim", 6, "bound", 7, "dist", 8, "exp", 9, "other", 10, "triang", ((void *)0) }; there is type mismatch while assign srtuct ... if u replace NULL by, '0' ascii value of '0' is assign to first element of struct .... Regards Rajath.N.R