[coreboot-gerrit] New patch to review for coreboot: cbfstool: guard _Static_assert
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Tue Sep 1 10:39:28 CET 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11475
-gerrit
commit ee495d9976d8f2dc811e79222cd20851ec34d5bf
Author: Patrick Georgi <patrick at georgi-clan.de>
Date: Tue Sep 1 12:37:41 2015 +0200
cbfstool: guard _Static_assert
This isn't required for correct execution, and doesn't need to be tested
on every single compiler out there.
Since GCC < 4.5 has no idea about _Static_assert, hide it there. Our
build tests will make sure that the test is run before changes are
submitted to master.
Change-Id: I4141f4aa23b140d2d1017ca7b4dace5aa7db0c04
Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
util/cbfstool/cbfs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index 44e3dcd..d1b97c5 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -88,7 +88,9 @@ struct cbfs_file {
char filename[];
} __PACKED;
+#if defined __GNUC__ && (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
_Static_assert(sizeof(struct cbfs_file) == 24, "cbfs_file size mismatch");
+#endif
/* The common fields of extended cbfs file attributes.
Attributes are expected to start with tag/len, then append their
More information about the coreboot-gerrit
mailing list