From nobody Tue May 24 13:51:46 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 D5F511AEEF31; Tue, 24 May 2022 13:51:46 +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 4L6wbk5jCKz4YnH; Tue, 24 May 2022 13:51:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653400306; 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=EBfX6/ds3RcD22E26mYaaj7A+KlA1sTHk6xnk4J/exc=; b=N9QbEPbX+b3iwvTS2Ey9u4rKGYszTGnQJuQVGAcv4yn7xYHxEnirqYHXc/Z1B3XBXpkSrV 8b9af8Rkr5r0bLMzVy0N0vljQA+8ki+PbEX3H2/7uCYIsbAkx01AQtPDAGo+xin9gQ5T1f iemrTKC1nA23bMtnHYNfH5tYGspL7MQVanFRaOTqn+uZF5DHS2+qgfJvDfJ2wTsUe1QZlw ePXe1iT7p6exprNswfPdO/kImcMAD/9r5rXprT19BbdB8YMmjojVczvPsNLCiCL04hHaB5 lrSo3aHvJXIusezyEMc/W46FX3VEeI/6KAVn/+Wro2dNM+fuqzWADhgYjdXBEQ== 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 A42C725739; Tue, 24 May 2022 13:51:46 +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 24ODpkmY064071; Tue, 24 May 2022 13:51:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24ODpkRh064070; Tue, 24 May 2022 13:51:46 GMT (envelope-from git) Date: Tue, 24 May 2022 13:51:46 GMT Message-Id: <202205241351.24ODpkRh064070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9f093bf1e897 - stable/13 - newfs_msdos: Fix warnings that arise when compiled for makefs 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9f093bf1e89796bec0a88873a29146faa50fa8ed Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653400306; 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=EBfX6/ds3RcD22E26mYaaj7A+KlA1sTHk6xnk4J/exc=; b=hyKCEcFlYyRdp5nzuQvseEwqf2pvr6hZdpLUYpveebB5psQmyQC5oXPgh+B8KbhLm6oDfU 7cAQir1ThBqo4qvhzTEyPdRUM5YZFEVF7bKzYD8gbr6MGMgldXfyfQudulHwfnu8A85axs ZzviY7+sh0cPBt9LXZH1jY+eQ4sCdzTljT7NzHKIJ+NR/6uOSYsiaud2VcDHTDTO4jwecS 8hGPlSvIy+tM4oGalTeV8x1iX54yOQfq0tw2rzVjP2GJDqBWgNa6GDNMjl3FauPg5+ANpG APgAANuckPlCzzdXPWGBQhEoo7JCGBXomXZDejoXNdq6o2Sf3b7gLSV45nnfEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653400306; a=rsa-sha256; cv=none; b=QURgYFJEGj1BfG8kxzo0umHDUaPYCJ2ooVdRd/kSk9I2UUzkrqkL+VOMZ8RK5CCjE/OaeE uU0NSJUAr7YK+Z/bCD0O0ikR2dznSQ79EltpOsjoirOYdBhEsrGLJMZgxtDx4sqWPGZL1Z hm0kO4bGderVJAwt9VUvwXayWrkK2ZqjuBvcKeHy/AU6FctWZABtCARfdMQ4mOANy4Ikso hFX0eDRQeupXJQ4kHYZcJyjT2NtJQ7vSEpIh4GLqvAREzSEmiboUplJ0muQgmN70wRns2F WWJBlQ+VH/i0kuUDBULPuYFKZ+1B59lXD4wmkhfIqziX7j96AtedftcNJvIvGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9f093bf1e89796bec0a88873a29146faa50fa8ed commit 9f093bf1e89796bec0a88873a29146faa50fa8ed Author: Mark Johnston AuthorDate: 2022-04-29 13:16:54 +0000 Commit: Mark Johnston CommitDate: 2022-05-24 13:51:27 +0000 newfs_msdos: Fix warnings that arise when compiled for makefs Sponsored by: The FreeBSD Foundation (cherry picked from commit f775c417fd9dd29d7bd987fc1cd30c6024540312) --- sbin/newfs_msdos/mkfs_msdos.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c index 18545a79ea01..a3a86bd7d233 100644 --- a/sbin/newfs_msdos/mkfs_msdos.c +++ b/sbin/newfs_msdos/mkfs_msdos.c @@ -222,7 +222,9 @@ static const u_int8_t bootcode[] = { static volatile sig_atomic_t got_siginfo; static void infohandler(int); +#ifndef MAKEFS static int check_mounted(const char *, mode_t); +#endif static ssize_t getchunksize(void); static int getstdfmt(const char *, struct bpb *); static int getdiskinfo(int, const char *, const char *, int, struct bpb *); @@ -800,6 +802,7 @@ done: /* * return -1 with error if file system is mounted. */ +#ifndef MAKEFS static int check_mounted(const char *fname, mode_t mode) { @@ -807,7 +810,6 @@ check_mounted(const char *fname, mode_t mode) * If getmntinfo() is not available (e.g. Linux) don't check. This should * not be a problem since we will only be using makefs to create images. */ -#if !defined(MAKEFS) struct statfs *mp; const char *s1, *s2; size_t len; @@ -832,9 +834,9 @@ check_mounted(const char *fname, mode_t mode) return -1; } } -#endif return 0; } +#endif /* * Get optimal I/O size @@ -977,6 +979,7 @@ getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag, lp = &dlp; } #else + (void)dtype; /* In the makefs case we only support image files: */ compute_geometry_from_file(fd, fname, &dlp); lp = &dlp;