read(fd,&y, sizeof y)

gwyn%brl-vld at sri-unix.UUCP gwyn%brl-vld at sri-unix.UUCP
Sun Mar 4 19:33:50 AEST 1984


From:      Doug Gwyn (VLD/VMB) <gwyn at brl-vld>

The (char *) is not "just to please lint".  Different pointer types
in general have different sizes so one MUST coerce the pointer to
the type expected by the function.

I know of C (not UNIX) implementations where the cast is definitely
necessary.  This usually occurs on word-addressible machines where a
(char *) cannot be fully contained in a single word.

You seem to have a funny idea about "lint"'s purpose.



More information about the Comp.unix.wizards mailing list