teach sparse about __{BIG,LITTLE}_ENDIAN__
commita94597eb285254a85001a8453a95238f70de691d
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tue, 20 Jun 2017 17:02:29 +0000 (20 19:02 +0200)
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 21 Jun 2017 09:28:40 +0000 (21 11:28 +0200)
tree29b6de8fdfdd4d7520e1217f0313359665692430
parent398907b40bc91b35910a1657d729c2c2d4de0f57
teach sparse about __{BIG,LITTLE}_ENDIAN__

Some macros, structures definitions, ... are endianness specific.
This is generaly done with the help of some header files but these
headers often need information from the compiler via the macros
__BIG_ENDIAN__ / __LITTLE_ENDIAN__.

Without these defines, sparse's pre-processor may interpret things
differently than the compiler would do which may hide errors or
warn on code that is compiled out.

Fix this by letting sparse predefine these macros like compilers do.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: Christopher Li <sparse@chrisli.org>
lib.c
validation/endian-big.c [new file with mode: 0644]
validation/endian-little.c [new file with mode: 0644]