> Date: Wed, 30 Dec 2015 11:30:11 -0500 > From: Michael McConville <mm...@mykolab.com> > > Christian Weisgerber wrote: > > Christian Weisgerber: > > > > > The removal of the casts causes a problem in ports/devel/mico, where > > > the yacc output is used in C++: > > > > Also: > > graphics/grap > > math/aamath > > math/logic2cnf > > ok?
Please revert the diff. Then propose a new diff that only changes the NULL-check for free. > Index: skeleton.c > =================================================================== > RCS file: /cvs/src/usr.bin/yacc/skeleton.c,v > retrieving revision 1.36 > diff -u -p -r1.36 skeleton.c > --- skeleton.c 28 Dec 2015 19:14:04 -0000 1.36 > +++ skeleton.c 30 Dec 2015 16:28:57 -0000 > @@ -137,14 +137,14 @@ char *body[] = > "#endif", > " if (newsize && YY_SIZE_MAX / newsize < sizeof *newss)", > " goto bail;", > - " newss = realloc(yyss, newsize * sizeof(*newss)); /* overflow check > above */", > + " newss = (short *)realloc(yyss, newsize * sizeof(*newss)); /* > overflow check above */", > " if (newss == NULL)", > " goto bail;", > " yyss = newss;", > " yyssp = newss + sslen;", > " if (newsize && YY_SIZE_MAX / newsize < sizeof *newvs)", > " goto bail;", > - " newvs = realloc(yyvs, newsize * sizeof(*newvs)); /* overflow check > above */", > + " newvs = (short *)realloc(yyvs, newsize * sizeof(*newvs)); /* > overflow check above */", > " if (newvs == NULL)", > " goto bail;", > " yyvs = newvs;", > >