In several cases sparse complains about:
invalid access pastthe end of 'xxx'

Examples are in arch/i386/kernel/signal.c, ioport.c
The warning is correct but a bit annoying.

The following code snippet make sparse emit the same warning:


struct big
{
        long a;
        long b;
};

struct big fun(long a)
{
        struct big *p = (struct big *) &a;
        return *p;
}

The pattern above is used to play tricks with the stack frame - so the
code in question is OK and the warning is correct.
Are there any way to quiet sparse without uglifying the code (too much)?

Rational behind quit sparse is that the number of warnings may hide the
important warnings when we are below 10 fixable sparse warnings on a full
kernel build.


Sparse compare the bit sizes of both types and see that bitsize of
struct big is larger than long - therefore it complain.
Various ways of casting did not silent sparse - actually a nice test
that just shows that sparse handle bitsize correct when we cast.

        Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to