NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/38142: lint -S complains on variable length arrays



>Number:         38142
>Category:       bin
>Synopsis:       lint -S complains on variable length arrays
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 03 01:40:00 +0000 2008
>Originator:     YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost>
>Release:        NetBSD 4.99.55
>Organization:
        
>Environment:
>Description:
        lint -S complains on variable length arrays which are a part for c99.
>How-To-Repeat:
        % cat x.c
        void
        foo(int n)
        {
                int x[n];
        }
        % lint -S x.c
        x.c:
        x.c(4): warning: variable array dimension is a GCC extension [318]
        x.c(4): warning: x unused in function foo [192]
        x.c(2): warning: argument n unused in function foo [231]
        Lint pass2:
        foo defined( x.c(2) ), but never used
        % 
>Fix:
        



Home | Main Index | Thread Index | Old Index