From nobody Tue May 10 21:41:50 2022 X-Original-To: dev-commits-src-all@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 32DBD1AC3A6D; Tue, 10 May 2022 21:41:51 +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 4KyWhb0SSvz3vNk; Tue, 10 May 2022 21:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652218911; 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=Zb+qR3bNxK61zUUI/Bx/MgayWxHF+CgaEhpNkF9nd6g=; b=inp/rgQUjRscwdxGIBr1ZJU9d/IFrmbYPsDis7xk4/qzPaIjbbSt6xqVNuNpREJkMG2Yke 0AyabqtGXQXXzilt7O7Fhfu4xh50K6O1wriBcEk0jmuGZq5t36yuyNlBcHQq6pNSbyG93k 3Wr+QGJlfEY71mkRIl2L76HS99bXMX/UCBwXr9CmMjGgGSx+0IsvVOeYCuL3S0ewwFEnGc LmoMFLtRHrPFHYHqhUNNgPQJMi3Tw+0ziAvmdP1B/+4lzu5aEEJwM25rLvphHFOTor4290 3JPx7zQf9V1tFkvdpqMMjFGXMNY20a4luM5SAZEgxRVWetKyQG6TB5oYVCaiIg== 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 D5F85570D; Tue, 10 May 2022 21:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24ALfoUd033662; Tue, 10 May 2022 21:41:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24ALfoYE033649; Tue, 10 May 2022 21:41:50 GMT (envelope-from git) Date: Tue, 10 May 2022 21:41:50 GMT Message-Id: <202205102141.24ALfoYE033649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cc1a53bc1aea - main - makefs: Fix warnings and reset WARNS to the default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc1a53bc1aea0675d64e9547cdca241612906592 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652218911; 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=Zb+qR3bNxK61zUUI/Bx/MgayWxHF+CgaEhpNkF9nd6g=; b=KXTRMA4FfdcKxJMtWByieNExnrCRHo0SjDYNnVQmobpZJNKa3u/aJcULiTlYK8NqOhUo+w dgsKirwBbtXKMkRw+i+6oUrM8aSYv3v0ve4PPvq0+jWzr0RNx3SG0GX5t4PxBOVqhFmtj/ rGfrie6Gcz8lc57urS423ywq4FjmlxyGVUGqq9fObsFQOcNsLP20o8NnpLAK8qp5jMzu6T hLSJOkKRQgh1rXCzoB7azdi8+HAsS+8kMoZEcRNiuvV9F4LAvahlnvUO5fsJGs+AcIj09j qR8W5ATPpWI6CIvXCgHEKX9S8i/mYODI4IxAsEwkoVuvYVFBgAlDwnYIXVoJFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652218911; a=rsa-sha256; cv=none; b=hMY0UdTxWlTGW04V+m4y9u5BemDxp5sMGGBCUqsOZrNF5hVY4W4tiBOFJ/QZGumre5+v94 jahzk2rz02eewqWWv7XL2ot7yLJHrqgeRClkt5B/IrgX2R6WKNU+9zrsfQrIQ28OpH8cXb 2I3T2FfotP+OtImPVeQvMtqnnixxXkegDS4ztNzTi3ZkuD8Nbxb3YwnSDRL8SIdkkvxOxG amX/pTZWqSkoiqdl87ELWMcoP2URAGsumi+qrSGrZyfQ7iSn2VxY2pBR7axB5UcWuRyWYT 8u5cF4kJAcoLt6VbAxxTReaL83w/7/YnFiAM+J+dv2GnLL/U8J6lqGbk3SGhaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cc1a53bc1aea0675d64e9547cdca241612906592 commit cc1a53bc1aea0675d64e9547cdca241612906592 Author: Mark Johnston AuthorDate: 2022-04-29 13:18:02 +0000 Commit: Mark Johnston CommitDate: 2022-05-10 21:38:23 +0000 makefs: Fix warnings and reset WARNS to the default Leave -Wcast-align disabled, at least for now, since there are numerous instances of that warning in places where buffer pointers are cast to pointers to various filesystem structures. Fixing this properly would be too much work for too little gain. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/Makefile | 2 +- usr.sbin/makefs/ffs.c | 2 +- usr.sbin/makefs/msdos/msdosfs_denode.c | 10 ++++------ usr.sbin/makefs/msdos/msdosfs_vnops.c | 3 ++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index cbe4f497d7d1..3fea648f9383 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -16,7 +16,7 @@ SRCS= cd9660.c \ walk.c MAN= makefs.8 -WARNS?= 2 +NO_WCAST_ALIGN= CSTD= c11 .include "${SRCDIR}/cd9660/Makefile.inc" diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index 9cfbcbc30d75..1e68b0931f16 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -578,7 +578,7 @@ ffs_create_image(const char *image, fsinfo_t *fsopts) (long long)fs->fs_cstotal.cs_ndir); } - if (fs->fs_cstotal.cs_nifree + UFS_ROOTINO < fsopts->inodes) { + if (fs->fs_cstotal.cs_nifree + (off_t)UFS_ROOTINO < fsopts->inodes) { warnx( "Image file `%s' has %lld free inodes; %lld are required.", image, diff --git a/usr.sbin/makefs/msdos/msdosfs_denode.c b/usr.sbin/makefs/msdos/msdosfs_denode.c index 3fbd867275d2..ff706ad99563 100644 --- a/usr.sbin/makefs/msdos/msdosfs_denode.c +++ b/usr.sbin/makefs/msdos/msdosfs_denode.c @@ -210,7 +210,6 @@ int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) { int error; - int allerror; u_long eofentry; u_long chaintofree; daddr_t bn; @@ -253,7 +252,7 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) if (length == 0) { chaintofree = dep->de_StartCluster; dep->de_StartCluster = 0; - eofentry = ~0; + eofentry = ~0ul; } else { error = pcbmap(dep, de_clcount(pmp, length) - 1, 0, &eofentry, 0); @@ -295,14 +294,13 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) dep->de_FileSize = length; if (!isadir) dep->de_flag |= DE_UPDATE|DE_MODIFIED; - MSDOSFS_DPRINTF(("detrunc(): allerror %d, eofentry %lu\n", - allerror, eofentry)); + MSDOSFS_DPRINTF(("detrunc(): eofentry %lu\n", eofentry)); /* * If we need to break the cluster chain for the file then do it * now. */ - if (eofentry != ~0) { + if (eofentry != ~0ul) { error = fatentry(FAT_GET_AND_SET, pmp, eofentry, &chaintofree, CLUST_EOFE); if (error) { @@ -321,7 +319,7 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) if (chaintofree != 0 && !MSDOSFSEOF(pmp, chaintofree)) freeclusterchain(pmp, chaintofree); - return (allerror); + return (0); } /* diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index ed33856716f1..5bc9b495c586 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -537,7 +537,8 @@ static const struct { }; struct denode * -msdosfs_mkdire(const char *path, struct denode *pdep, fsnode *node) { +msdosfs_mkdire(const char *path __unused, struct denode *pdep, fsnode *node) +{ struct denode ndirent; struct denode *dep; struct componentname cn;