Eitan Adler <[EMAIL PROTECTED]> writes:
> Xin LI <[EMAIL PROTECTED]> writes:
> > Tanks for interested in this but I'm afraid that your patch is
> > incorrect.  mkstemp returns a file descriptor rather than a string
> > pointer, therefore, the subsequent open() would have undefined
> > behavior.  It looks like that we actually want fd = mkstemp() here.
> Thanks.  If this is the case how come gcc did not return any warnings?

Because ee(1) is built with most warnings disabled, precisely because
the source code is of such poor quality (by modern standards).  Try
this:

$ cd /usr/src/usr.bin/ee
$ make clean
$ make WARNS=3 2>&1 | grep -cw warning
72
$ make WARNS=6 2>&1 | grep -cw warning 
188

This is on amd64; you will get fewer on i386.  Someone added casts to
silence legitimate warnings about pointers being assigned to integers,
so gcc will only complain about those assignments on platforms where
sizeof(int) == sizeof(void *).

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to