Blob Blame History Raw
For some reason the s390x build (and only the s390x build) fails with:

/builddir/build/BUILD/widelands-build20/src/ui_basic/box.cc: In member function 'virtual void UI::Box::layout()':
/builddir/build/BUILD/widelands-build20/src/ui_basic/box.cc:163:14: error: 'depth' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  163 |   totaldepth += depth;
      |   ~~~~~~~~~~~^~~~~~~~
cc1plus: some warnings being treated as errors

This fixes this.
diff -Nrup a/src/ui_basic/box.cc b/src/ui_basic/box.cc
--- a/src/ui_basic/box.cc	2019-05-01 23:23:39.000000000 -0600
+++ b/src/ui_basic/box.cc	2019-11-12 16:10:28.893117299 -0700
@@ -158,7 +158,7 @@ void Box::layout() {
 	int totaldepth = 0;
 
 	for (size_t idx = 0; idx < items_.size(); ++idx) {
-		int depth, unused = 0;
+		int depth = 0, unused = 0;
 		get_item_desired_size(idx, &depth, &unused);
 		totaldepth += depth;
 	}
@@ -246,7 +246,7 @@ void Box::update_positions() {
 	}
 
 	for (uint32_t idx = 0; idx < items_.size(); ++idx) {
-		int depth, breadth = 0;
+		int depth = 0, breadth = 0;
 		get_item_size(idx, &depth, &breadth);
 
 		if (items_[idx].type == Item::ItemPanel) {