Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision 000178a875fc503fd49fa68233685aeea90aff8f)
+++ src/InitTweak/FixInit.cc	(revision ddae80952adda8c0439bcb45ce5c85a4e6001acb)
@@ -501,4 +501,18 @@
 		}
 
+		// to prevent warnings (‘_unq0’ may be used uninitialized in this function),
+		// insert an appropriate zero initializer for UniqueExpr temporaries.
+		Initializer * makeInit( Type * t ) {
+			if ( StructInstType * inst = dynamic_cast< StructInstType * >( t ) ) {
+				// initizer for empty struct must be empty
+				if ( inst->baseStruct->members.empty() ) return new ListInit({});
+			} else if ( UnionInstType * inst = dynamic_cast< UnionInstType * >( t ) ) {
+				// initizer for empty union must be empty
+				if ( inst->baseUnion->members.empty() ) return new ListInit({});
+			}
+
+			return new ListInit( { new SingleInit( new ConstantExpr( Constant::from_int( 0 ) ) ) } );
+		}
+
 		void ResolveCopyCtors::postvisit( UniqueExpr * unqExpr ) {
 			if ( vars.count( unqExpr->get_id() ) ) {
@@ -515,5 +529,5 @@
 			} else {
 				// expr isn't a call expr, so create a new temporary variable to use to hold the value of the unique expression
-				unqExpr->set_object( ObjectDecl::newObject( toString("_unq", unqExpr->get_id()), unqExpr->get_result()->clone(), nullptr ) );
+				unqExpr->set_object( ObjectDecl::newObject( toString("_unq", unqExpr->get_id()), unqExpr->get_result()->clone(), makeInit( unqExpr->get_result() ) ) );
 				unqExpr->set_var( new VariableExpr( unqExpr->get_object() ) );
 			}
