teach sparse about __BYTE_ORDER__ & __ORDER_{BIG,LITTLE}_ENDIAN__
commit7ef3df201b51d6df694896d7382803b55d4f44da
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tue, 20 Jun 2017 19:05:42 +0000 (20 21:05 +0200)
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 21 Jun 2017 09:28:40 +0000 (21 11:28 +0200)
tree5a682961a097de87ed8a7de5cb01fd0d43836713
parenta94597eb285254a85001a8453a95238f70de691d
teach sparse about __BYTE_ORDER__ & __ORDER_{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 macro
__BYTE_ORDER__, itself being defined to __ORDER_BIG_ENDIAN__ or
__ORDER_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
validation/endian-little.c