Dumb question on dyn. mem. alloc (if(hate(novices)) dont_read();)

Swamp Thing mff at wuphys.UUCP
Tue Jul 23 01:25:07 AEST 1985


In article <921 at umcp-cs.UUCP> chris at umcp-cs.UUCP (Chris Torek) writes:
>Lint doesn't realize that malloc and calloc have been written such
>that that "possible pointer alignment problem" never occurs.  The
>thing to do is ignore the message (or teach lint how to say that
>a function returns a ``very aligned'' pointer; someone once suggested
>using /*ALIGNOK*/ similar to the way /*NOTREACHED*/ and /*ARGSUSED*/
>tell lint not to complain).

It seems to me that the thing to do is change or eliminate malloc and calloc.
It seems like a small price to pay to satisfy the great and powerful LINT.
Hardly any change at all compared to creating an entire new variable type!



						Mark F. Flynn
						Department of Physics
						Washington University
						St. Louis, MO  63130
						ihnp4!wuphys!mff

"Into the void boys, into the void."



More information about the Comp.lang.c mailing list