sparse: update __builtin_object_size() prototype
commit82d573cb15e33fd843ecf20ad559b1eb227ffc01
authorLance Richardson <lrichard@redhat.com>
Wed, 21 Sep 2016 14:13:58 +0000 (21 10:13 -0400)
committerChristopher Li <sparse@chrisli.org>
Fri, 27 Jan 2017 16:53:08 +0000 (27 08:53 -0800)
tree7443dbff19e234296a8d5e24407734c5a40aeb41
parent9208e04972f2c23bf45448991dd425cb14200d85
sparse: update __builtin_object_size() prototype

Sparse emits a large number of warnings for the linux kernel source
tree of the form:
    ./arch/x86/include/asm/uaccess.h:735:18: \
        warning: incorrect type in argument 1 (different modifiers)
    ./arch/x86/include/asm/uaccess.h:735:18:    expected void *<noident>
    ./arch/x86/include/asm/uaccess.h:735:18:    got void const *from

Fix by making the first parameter to __builtin_object_size()
type "const void *" instead of "void *", which is consistent with GCC
behavior (the prototype for this builtin in GCC documentation is evidently
incorrect).

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
lib.c