From nobody Fri Oct 27 23:41:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SHK1G3rTCz4y684; Fri, 27 Oct 2023 23:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SHK1G3GF8z4jb3; Fri, 27 Oct 2023 23:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698450066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwecQl5H/33rQ5cPFBjscY6I2VYjST/M7XaP2vSUERk=; b=GwzxAATZYAheri3EaS+LQ80WZPjuYe35jZ7anDFtiFZAkhEc1nWY5teFvt2q80Z+gXQXig ccFU0rAmwn+IOPvltFl49qbW3Ni74rDASEehSVsI9u8RiX0fIx9Lq67E3wqlGrW1kng2Xp GkbI16u1drryzJqwmg53kY6ifkav2+3pu8opbf6h6hcIdPw78O9vjY/eVQq5Cg1YMePwdv Oo9bMvTz1Liey9id1fnaasMMsqTXoE/OEzUq/JUPJyNF12Pxa1HlqCKOnG9Ddd24DaSSFy Kqfw7TLQpbk4cKR5UAM04tUtCJ/uFNIjJSxOE8RUrPstfzKUpHzFnPtWLJmyJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698450066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwecQl5H/33rQ5cPFBjscY6I2VYjST/M7XaP2vSUERk=; b=C9upQt9Y0G4kDvEEV86A4IAozcdXi75erc6su/9VRfZM61SPqv9NWZXtCefxE+WKIl0uwK mK9fxVVWvhqznfKyP/wLArzjSy3kK8FmnY3a5/+/Of+kbu44C4lyP3TUWoLja0nT53MGMT wyNHFVuNhHEH//cLIBneby1/bhLTE+posHPmFY1fe6RZYKoZM6Ek5OebKgkEXQ6s/mOSgs gKPFRk/O341i4Kszfz5h/BDlnY/mU5Kxq6MjKQrtj0m3eYRg/4dhyuEUof+BHwn+a/fQfd D2ejfJxxpLCrIm+Q5IcgWb/iHao2R4xhPpIFtwJxiBFcrVGnb3z77OOsJDAjZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698450066; a=rsa-sha256; cv=none; b=Fp18gblf0VUabff8Wq+ySBrM7VWzsO2NM/Awa7+uhkHAkzS8dXtKfrORE/kADV6bRivwX/ 8eCfJ8WlZSpTcIn8KQtirKqfB8MSU74660iRfcvK9e74q5LArKDq0ltuXhJPV5qSQp+aN/ O1YKXb+e11QPDMxPs5AawkyOQdw0tc/DnYvuvJNrXSB6EKlGSqtJDssaNw3PIZGXUZmPLA 0ndRayLQGmF02hz3ILJG8DtM0GVdKdRn4V3J1TTuCEeaTZcuKSAO5E2Py6yvkVGVw8zy9J PVKrGPZS8wxfhkso+L15hOzbfK/KbmjZSl4E8xulCntevYN2RO0PdAeUv6jOnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SHK1G2KfSzZDj; Fri, 27 Oct 2023 23:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39RNf6NP005310; Fri, 27 Oct 2023 23:41:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39RNf6et005307; Fri, 27 Oct 2023 23:41:06 GMT (envelope-from git) Date: Fri, 27 Oct 2023 23:41:06 GMT Message-Id: <202310272341.39RNf6et005307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: c656f5c1a6f8 - main - Fix build with gcc12. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c656f5c1a6f8482f24a5a716267311c3e62b3114 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c656f5c1a6f8482f24a5a716267311c3e62b3114 commit c656f5c1a6f8482f24a5a716267311c3e62b3114 Author: Navdeep Parhar AuthorDate: 2023-10-27 23:39:12 +0000 Commit: Navdeep Parhar CommitDate: 2023-10-27 23:39:12 +0000 Fix build with gcc12. --- sys/fs/ext2fs/ext2_inode.c | 6 ++++++ sys/ufs/ffs/ffs_inode.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c index 3ab566ee53fc..2c1cf9736fb5 100644 --- a/sys/fs/ext2fs/ext2_inode.c +++ b/sys/fs/ext2fs/ext2_inode.c @@ -232,7 +232,9 @@ ext2_ind_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred, struct inode *oip; e4fs_daddr_t bn, lbn, lastiblock[EXT2_NIADDR], indir_lbn[EXT2_NIADDR]; uint32_t oldblks[EXT2_NDADDR + EXT2_NIADDR]; +#ifdef INVARIANTS uint32_t newblks[EXT2_NDADDR + EXT2_NIADDR]; +#endif struct m_ext2fs *fs; struct buf *bp; int offset, size, level; @@ -348,11 +350,15 @@ ext2_ind_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred, * when we are done. */ for (i = 0; i < EXT2_NDADDR; i++) { +#ifdef INVARIANTS newblks[i] = oip->i_db[i]; +#endif oip->i_db[i] = oldblks[i]; } for (i = 0; i < EXT2_NIADDR; i++) { +#ifdef INVARIANTS newblks[EXT2_NDADDR + i] = oip->i_ib[i]; +#endif oip->i_ib[i] = oldblks[EXT2_NDADDR + i]; } oip->i_size = osize; diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index fb6e8dfb2f76..8ecd37e694e8 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -238,7 +238,9 @@ ffs_truncate(struct vnode *vp, struct inode *ip; ufs2_daddr_t bn, lbn, lastblock, lastiblock[UFS_NIADDR]; ufs2_daddr_t indir_lbn[UFS_NIADDR], oldblks[UFS_NDADDR + UFS_NIADDR]; +#ifdef INVARIANTS ufs2_daddr_t newblks[UFS_NDADDR + UFS_NIADDR]; +#endif ufs2_daddr_t count, blocksreleased = 0, blkno; struct bufobj *bo __diagused; struct fs *fs; @@ -546,11 +548,15 @@ ffs_truncate(struct vnode *vp, * when we are done. */ for (i = 0; i < UFS_NDADDR; i++) { +#ifdef INVARIANTS newblks[i] = DIP(ip, i_db[i]); +#endif DIP_SET(ip, i_db[i], oldblks[i]); } for (i = 0; i < UFS_NIADDR; i++) { +#ifdef INVARIANTS newblks[UFS_NDADDR + i] = DIP(ip, i_ib[i]); +#endif DIP_SET(ip, i_ib[i], oldblks[UFS_NDADDR + i]); } ip->i_size = osize;