1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 06:01:16 +02:00

endiantest: Fix #if expression

Without this, `gcc -E endiantest.c` can fail and return the incorrect
endiannes as well as exiting with non-zero. Here is the actual error
shown in the output:

endiantest.c:2:31: error: #if with no expression
 #if __FLASHROM_LITTLE_ENDIAN__

I was able to reproduce this using gcc-6.3.0 and clang-4.0.1, but
newer compilers didn't have this issue.

Change-Id: Iba2febd861471ec821a494336e800c2564984332
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/43598
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
David Hendricks
2020-07-19 13:02:03 -07:00
parent c66d5f8cb3
commit 0c65b5048d

View File

@ -1,5 +1,5 @@
#include "platform.h"
#if __FLASHROM_LITTLE_ENDIAN__
#if defined(__FLASHROM_LITTLE_ENDIAN__)
little
#else
big