Re^2: Discarded Function Values (To Cast or Not to Cast)

Steve Emmerson steve at groucho.ucar.edu
Wed Nov 22 05:01:57 AEST 1989


diamond at csl.sony.co.jp (Norman Diamond) writes:

>What DO you do about calls to malloc?

1) Put something like this in /usr/lib/lint/llib-lc and regenerate llib-lc.ln:

    void  lint_malloc(n) unsigned n; { n = n; }

2) Put something like this in /usr/include/malloc.h (if you have one):

    #ifdef lint
    #   define  malloc(x)       (lint_malloc(x), 0)
    #else
        extern char             *malloc();
    #endif

-----
Steve Emmerson		steve at unidata.ucar.edu



More information about the Comp.lang.c mailing list