Ne v kontakte Antisocial programmer's blog

lint, large file, _FILE_OFFSET_BITS 64, problem, solaris, llib-lc

    dev     unix     solaris     bugs


If you are using long file (more than 4Gb) support for C standart library (via defining _FILE_OFFSET_BITS 64 macro or something else) and lint shows you errors like this:

(88) warning: constant in conditional context

argument unused in function
    (18) sig in sighandler

value type declared inconsistently
    lseek               llib-lc:unistd.h(396) long () :: unistd.h(396) long long ()
    tell                llib-lc:unistd.h(515) long () :: unistd.h(515) long long ()
    ftello              llib-lc:stdio.h(319) long () :: stdio.h(319) long long ()

function returns value which is always ignored
    fflush              fprintf             printf              fwrite
    signal              alarm               lseek64

function argument ( number ) declared inconsistently
    ftruncate (arg 2)   llib-lc:unistd.h(320) long  :: unistd.h(320) long long
    lockf (arg 3)       llib-lc:unistd.h(394) long  :: unistd.h(394) long long
    lseek (arg 2)       llib-lc:unistd.h(396) long  :: unistd.h(396) long long
    pread (arg 4)       llib-lc:unistd.h(410) long  :: unistd.h(410) long long
    pwrite (arg 4)      llib-lc:unistd.h(434) long  :: unistd.h(434) long long
    truncate (arg 2)    llib-lc:unistd.h(520) long  :: unistd.h(520) long long
    fseeko (arg 2)      llib-lc:stdio.h(318) long  :: stdio.h(318) long long

declared global, could be static
    min                 main.c(13)
    sighandler          main.c(18)
    fp                  main.c(11)

...Don't panic! It's known bug:

Read more →