cast long to int in tags.c

Joerg Fischer jf505 at gmx.de
Sat Feb 2 21:41:00 CET 2008


Hi,

in tags.c in the function 'static int nextTFBlock(FILE *fp,...' the
local variables incPos and incLen are declared as int

        /* INCLUDE or ALIAS block */
        int incLen, incPos, i, incLines;

A bit later, the first use of incPos (inside a while loop parsing the
contents of the calltips file fp) is

        incPos = ftell(fp);

Is this correct?  I mean, since ftell returns a long, the result could
possibly get truncated, couldn't it?  Similarly, the first use of
incLen (after incPos was assigned) is

        incLen = ftell(fp) - incPos;

Cheers,
Jörg


More information about the Develop mailing list