From nobody Wed Dec 17 17:43:50 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 962161FC0E2; Fri, 3 Oct 2025 14:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759500676; cv=none; b=bdSmf0+nsrBeD15uKQqkACdGIXcx4n7iNxOkz1qOIGmV3fZ6Zkauui9kdkRHabKhOFhjWu0fFoL6B5a+QBavzXmZRrAOeFTyuZvZLdbx1qLXJ2XoAXmpOEjZBRj1TR3YaONqO+qUphMOaPCNofXvuF1luxkczg9jQ2JLBfNPLhU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759500676; c=relaxed/simple; bh=4vN1hEkmtmKRCkrSy9yEROR2zwPDFh6Z4FaS19nadUk=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Vhb+yKcDaLPTPAvlLHBDPwT88nhL2evq3SRqM/kS1BKbEBpiXXCOb/YImmV4Xg9qq0XYdetZ35t3p8XUDX9viZ+28+MvBLHin6PNqCjhUw3imOrbOyhlLbLY17kP7Xen8Q1+0wl2VCOBiIfrsP1jPuzlyBzsPMC58hzpLwrg3Rw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=useM9sfP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="useM9sfP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 423E9C4CEF5; Fri, 3 Oct 2025 14:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759500674; bh=4vN1hEkmtmKRCkrSy9yEROR2zwPDFh6Z4FaS19nadUk=; h=Date:From:To:Cc:Subject:From; b=useM9sfP6F/GkKCi7h4t6GsMEIWewPJCvIFTHd0suV7ge5Ofkt2GJhIxYDVfZDcvl tuoEkYPzlPKID/+XwMkM4bO/aVqsXI2jcU1CrKMrinjGXfO2igPTrvtW4JEMBhx4lb 93w9d5jj6cOAuofCB2zH4PLjff3VAWxg+bC1cSav1VNR5hVhwU30LEzZlO73i9JOYK oh+IswBQSd8wB7blxIKPjhRhlmYhz39R/ooqRNVd6lWdMcIWZJjgHPrS8SJDXqM9Nl PZFbb00O8Z5oZ7zTW/eeJfJm3u5oIDc8RSsly7jRN39jdsvICVgv+wbr+iQuoRlYNd nwRvs2PsbuZ6A== Date: Fri, 3 Oct 2025 15:11:06 +0100 From: "Gustavo A. R. Silva" To: Chris Mason , David Sterba Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH][next] btrfs: Avoid -Wflex-array-member-not-at-end warning Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration to the end of the corresponding structure. Notice that `struct fs_path` is a flexible structure, this is a structure that contains a flexible-array member (`char inline_buf[];` in this case). Fix the following warning: fs/btrfs/send.c:181:24: warning: structure containing a flexible array memb= er is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva --- fs/btrfs/send.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 9230e5066fc6..2b7cf49a35bb 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -178,7 +178,6 @@ struct send_ctx { u64 cur_inode_rdev; u64 cur_inode_last_extent; u64 cur_inode_next_write_offset; - struct fs_path cur_inode_path; bool cur_inode_new; bool cur_inode_new_gen; bool cur_inode_deleted; @@ -305,6 +304,9 @@ struct send_ctx { =20 struct btrfs_lru_cache dir_created_cache; struct btrfs_lru_cache dir_utimes_cache; + + /* Must be last --ends in a flexible-array member. */ + struct fs_path cur_inode_path; }; =20 struct pending_dir_move { --=20 2.43.0