On Tuesday, 1 May 2007 at 11:55, Dennis Schridde wrote:
> Am Montag, 30. April 2007 schrieb Christian Ohm:
> > On Monday, 30 April 2007 at 16:17, Giel van Schijndel wrote:
> > > > 2. gcc 4.2 complains about "audp_lval.sval[audp_leng-2] = (char) NULL;"
> > > > in lib/gamelib/audp_lexer.l". I've attached a patch to fix it, but
> > > > perhaps there's a better solution than just changing the cast to a 0.
> > >
> > > Doesn't simply using NULL (without the cast) work?
> >
> > No. Warning as is: "audp_lexer.l:104: warning: cast from pointer to
> > integer of different size", and with only NULL: "audp_lexer.l:104:
> > warning: assignment makes integer from pointer without a cast". So the
> > result is supposed to be an integer, and using NULL doesn't really make
> > sense there (not to speak of then casting it to char...).
> Without looking at the code:
> sval sounds like string-value. Which would mean that we need a char*.
Not quite - it's "sval[x] = y", not "sval = y"; so y needs to be a char
and the shortest way to do that is to just use "0".
--
Democracy means simply the bludgeoning of the people by the people for
the people.
-- Oscar Wilde
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev