Index: src/GenPoly/Box.cpp
===================================================================
--- src/GenPoly/Box.cpp	(revision f979f0ba3e91f53f961ddfb6b75fd4b82f468087)
+++ src/GenPoly/Box.cpp	(revision 35cc6d4773c9705fbac2d875d39d6aa6120e8f80)
@@ -86,9 +86,11 @@
 			makeLayoutCType()
 		) );
-		params.emplace_back( new ast::ObjectDecl(
+		auto alignParam = new ast::ObjectDecl(
 			sizedParam->location,
 			alignofName( paramName ),
 			makeLayoutCType()
-		) );
+		);
+		alignParam->attributes.push_back( new ast::Attribute( "unused" ) );
+		params.emplace_back( alignParam );
 	}
 }
Index: src/Validate/Autogen.cpp
===================================================================
--- src/Validate/Autogen.cpp	(revision f979f0ba3e91f53f961ddfb6b75fd4b82f468087)
+++ src/Validate/Autogen.cpp	(revision 35cc6d4773c9705fbac2d875d39d6aa6120e8f80)
@@ -229,8 +229,8 @@
 }
 
-/// Changes the node inside a pointer so that it has the unused attribute.
-void addUnusedAttribute( ast::ptr<ast::DeclWithType> & declPtr ) {
-	ast::DeclWithType * decl = declPtr.get_and_mutate();
+/// Changes the freshly-constructed (non-const) decl so that it has the unused attribute.
+ast::ObjectDecl * addUnusedAttribute( ast::ObjectDecl * decl ) {
 	decl->attributes.push_back( new ast::Attribute( "unused" ) );
+	return decl;
 }
 
@@ -373,11 +373,13 @@
 
 ast::ObjectDecl * FuncGenerator::dstParam() const {
-	return new ast::ObjectDecl( getLocation(), "_dst",
-		new ast::ReferenceType( ast::deepCopy( type ) ) );
+	return addUnusedAttribute(
+		new ast::ObjectDecl( getLocation(), "_dst",
+			new ast::ReferenceType( ast::deepCopy( type ) ) ) );
 }
 
 ast::ObjectDecl * FuncGenerator::srcParam() const {
-	return new ast::ObjectDecl( getLocation(), "_src",
-		ast::deepCopy( type ) );
+	return addUnusedAttribute(
+		new ast::ObjectDecl( getLocation(), "_src",
+			ast::deepCopy( type ) ) );
 }
 
@@ -673,6 +675,4 @@
 		// Default constructor and destructor is empty.
 		functionDecl->stmts = new ast::CompoundStmt( location );
-		// Add unused attribute to parameter to silence warnings.
-		addUnusedAttribute( params.front() );
 	}
 }
@@ -747,6 +747,4 @@
 		// Default constructor and destructor is empty.
 		functionDecl->stmts = new ast::CompoundStmt( location );
-		// Just add unused attribute to parameter to silence warnings.
-		addUnusedAttribute( params.front() );
 	}
 }
Index: src/Validate/CompoundLiteral.cpp
===================================================================
--- src/Validate/CompoundLiteral.cpp	(revision f979f0ba3e91f53f961ddfb6b75fd4b82f468087)
+++ src/Validate/CompoundLiteral.cpp	(revision 35cc6d4773c9705fbac2d875d39d6aa6120e8f80)
@@ -52,4 +52,7 @@
 		storageClasses
 		);
+	// FIXME: A resolution of #280 could make the unused attribute unnecessary here
+	//     (let test nowarn/unused decide)
+	temp->attributes.push_back( new ast::Attribute( "unused" ) );
 	declsToAddBefore.push_back( temp );
 	return new ast::VariableExpr( expr->location, temp );
Index: src/Validate/ImplementEnumFunc.cpp
===================================================================
--- src/Validate/ImplementEnumFunc.cpp	(revision f979f0ba3e91f53f961ddfb6b75fd4b82f468087)
+++ src/Validate/ImplementEnumFunc.cpp	(revision 35cc6d4773c9705fbac2d875d39d6aa6120e8f80)
@@ -240,5 +240,5 @@
 	return genProto(
 		"type_name",
-		{new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))},
+		{new ast::ObjectDecl(getLocation(), "", new ast::EnumInstType(decl))},
 		{new ast::ObjectDecl(
 			getLocation(), "_ret",
