casts to (void)

Alan T. Bowler [SDG] atbowler at watmath.UUCP
Thu Jul 25 08:05:29 AEST 1985


For functions like MEMCPY whose return value will normally be ignored
perhaps a more sensible approach is the one used by the Waterloo
SDG version of Lint.  It has a lint directive which indicates
that is applied where the function is defined, which tells LINT
that this routine has an optional result, and it is really not
an error to ignore it.
   This avoids a lot of clutter in source code like
     (void) memcpy(a, b, c);
used sparingly it is a great help.



More information about the Comp.lang.c mailing list