casts to (void)
Kim Christian Madsen
kimcm at diku.UUCP
Sun Aug 4 09:11:24 AEST 1985
In article <116 at rtp47.UUCP> meissner at rtp47.UUCP (Michael Meissner) writes:
>
>Whenever I use things like printf with lint, I define things like:
>
> #define Printf (void) printf
> #define Fputs (void) fputs
>
> /* ... */
>
> Printf("Hello World!\n");
>
>Which translates to:
>
> (void) printf("Hello World!\n");
>
>Thus lint is kept happy, and my program is not cluttered up with casts to void.
That's a mediocre solution, it shouldn't be necessary lint should know the
set of standard functions which results needn't be used. It's not accept-
able to either put (void) in front of printf(), scanf(), ...etc. or make
defines like "#define Printf (void) printf".
Regards
Kim Chr. Madsen
a.k.a. kimcm at diku.uucp
More information about the Comp.lang.c
mailing list