diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2015-09-01 12:37:41 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-09-01 14:52:20 +0000 |
commit | 57c67e5aa52426ee8665bc6e0706ac2abf625a13 (patch) | |
tree | 6a759759f349a66e37369cfa16e049e7848649b4 | |
parent | 23aeaff41b94af818191a8668a517abb04a7d516 (diff) | |
download | coreboot-57c67e5aa52426ee8665bc6e0706ac2abf625a13.tar.xz |
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@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11475
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
-rw-r--r-- | util/cbfstool/cbfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h index 44e3dcde6d..d1b97c51a0 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 |