[coreboot-gerrit] Change in coreboot[master]: util/cbfstool: fix build with clang

Patrick Georgi (Code Review) gerrit at coreboot.org
Thu Jul 19 17:34:48 CEST 2018


Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/27551


Change subject: util/cbfstool: fix build with clang
......................................................................

util/cbfstool: fix build with clang

Without the second set of braces it fails (due to -Werror) with
"suggest braces around initialization of subobject"

Change-Id: I63cb01dd26412599551ee921c3215a4aa69f4e17
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
M util/cbfstool/cbfs-mkpayload.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/27551/1

diff --git a/util/cbfstool/cbfs-mkpayload.c b/util/cbfstool/cbfs-mkpayload.c
index 8464a2b..d6c10ad 100644
--- a/util/cbfstool/cbfs-mkpayload.c
+++ b/util/cbfstool/cbfs-mkpayload.c
@@ -250,7 +250,7 @@
 				 enum comp_algo algo)
 {
 	comp_func_ptr compress;
-	struct cbfs_payload_segment segs[2] = {0};
+	struct cbfs_payload_segment segs[2] = { {0} };
 	int doffset, len = 0;
 
 	compress = compression_function(algo);
@@ -295,7 +295,7 @@
 			enum comp_algo algo)
 {
 	comp_func_ptr compress;
-	struct cbfs_payload_segment segs[2] = {0};
+	struct cbfs_payload_segment segs[2] = { {0} };
 	int doffset, len = 0;
 	firmware_volume_header_t *fv;
 	ffs_file_header_t *fh;

-- 
To view, visit https://review.coreboot.org/27551
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63cb01dd26412599551ee921c3215a4aa69f4e17
Gerrit-Change-Number: 27551
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180719/71dbfa57/attachment.html>


More information about the coreboot-gerrit mailing list