summaryrefslogtreecommitdiffstats
path: root/endiantest.c
diff options
context:
space:
mode:
authorDavid Hendricks <david.hendricks@gmail.com>2020-07-19 13:02:03 -0700
committerDavid Hendricks <david.hendricks@gmail.com>2020-07-21 04:46:24 +0000
commit0c65b5048df7a3b0ca5f760bb8d12816019aea96 (patch)
tree4ad3847992e57b86077484bd4e7ee09dc481a714 /endiantest.c
parentc66d5f8cb39807527d5b9433b2d82d10c0c8940e (diff)
downloadflashrom-0c65b5048df7a3b0ca5f760bb8d12816019aea96.tar.gz
flashrom-0c65b5048df7a3b0ca5f760bb8d12816019aea96.tar.bz2
flashrom-0c65b5048df7a3b0ca5f760bb8d12816019aea96.zip
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>
Diffstat (limited to 'endiantest.c')
-rw-r--r--endiantest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/endiantest.c b/endiantest.c
index de44ec5b0..a73b908a4 100644
--- a/endiantest.c
+++ b/endiantest.c
@@ -1,5 +1,5 @@
#include "platform.h"
-#if __FLASHROM_LITTLE_ENDIAN__
+#if defined(__FLASHROM_LITTLE_ENDIAN__)
little
#else
big