From 57c67e5aa52426ee8665bc6e0706ac2abf625a13 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 1 Sep 2015 12:37:41 +0200 Subject: 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 Reviewed-on: http://review.coreboot.org/11475 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh Reviewed-by: Jonathan A. Kollasch --- util/cbfstool/cbfs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util/cbfstool') 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 -- cgit v1.2.3