From nobody Tue May 10 21:41:49 2022 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 EBA471AC3C14; Tue, 10 May 2022 21:41:49 +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 4KyWhY6Mkbz3vLG; Tue, 10 May 2022 21:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652218909; 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=upruW++X9kokJKimnTousVMD9qaMuYpslYCJ0oqTXqU=; b=hKQyPfrNYpdjdIZbV1udqAIHWX0XE4CUq7aV1516ALazXYjyn81hpvtCuOL771HSxymr6l rOsWVkv+j5vmg/+9BN9M3rNeXFaDdeFiXYaHmB5+GIxhiETR4/1e2R5po5KCXPoqOXu+fY CZC9DI1BWBFStLczdwCsX5li5mX8aIFun4uXNiZxXbUbou894EyrhYXvy+VlXymKgdNCPq Zb8b7PrZ8Jujevjugt8P8XyRWGrrXMltKzZpQgCQcpeRJgqT5JidoKxe+Gd1XmSAqc3f7T XdlLrmxp3x1901vc5CnmIYrbssIVKxbp5whpa8QqbqStjhMfzBuxKF7tDxT57g== 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 BA5385784; Tue, 10 May 2022 21:41:49 +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 24ALfnJ2033179; Tue, 10 May 2022 21:41:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24ALfnO2033178; Tue, 10 May 2022 21:41:49 GMT (envelope-from git) Date: Tue, 10 May 2022 21:41:49 GMT Message-Id: <202205102141.24ALfnO2033178@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: f775c417fd9d - main - newfs_msdos: Fix warnings that arise when compiled for makefs 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f775c417fd9dd29d7bd987fc1cd30c6024540312 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652218909; 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=upruW++X9kokJKimnTousVMD9qaMuYpslYCJ0oqTXqU=; b=OQE4UWjoZtfVGMJPHb81jKPWXnc8KHKrYWYA7gOC3KrsB1FfwKbhdTQVj2VPUDzjy7CXbh 4D4XpQB/fWzGkTcG+ObTc6RHv/9ORDheUJgssftsD+Qz1BRNJqjXR0LUdgehgM9RlaLDiw wFr55TJm1TUXKQx7iTEwlDn4wJbGY4/eGMfEvIYAmklO+iz6VAAVavqvJjpfSVtB4F59Ej 9SBQ7eQHNy46L3N+s9NNnU9Lcl8DHxliv+8WeZzEl5/EiXeDoYfUtlDdcFdrhV06dLpRGN 4Ltk9CLgbKRW66c8OkYBRkM/N7RGHhxd6dqnEGf66yrxmPgBzqHSZtqQKLka4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652218909; a=rsa-sha256; cv=none; b=ky3vGRn0gMf1l/SQeYHjOk/6IuvLD5zSXKfleDBbUVUhfjW67/6n8lAcMcB/MzZ0O5nw2Z hyRfg6R+p+rHTa0D1pnJYbyzgjPCovcYeLkm7324Nz24RmEpq0WSJccG7K+UC/YfI65vEK Hyt+9uPCE+CA04L8dfdqAYRsTCKPqOWPcudkubXelgKP3b2qREbG9WfEssgKuSZyDRt9rx E2xzqUBmP72fT5pMPFWVlu6mNtlDeOcd8vBnnsxQzRzeF4PecqATTcBXMSvDJq/VMU6l0P 28884XPM0gFr7Sh62UVXLt4MLbFYqzDyWupyhr8HmqpHqWf4udH1bA9MWCwOfw== 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=f775c417fd9dd29d7bd987fc1cd30c6024540312 commit f775c417fd9dd29d7bd987fc1cd30c6024540312 Author: Mark Johnston AuthorDate: 2022-04-29 13:16:54 +0000 Commit: Mark Johnston CommitDate: 2022-05-10 21:26:50 +0000 newfs_msdos: Fix warnings that arise when compiled for makefs MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- 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 93dc5cf88049..13a804c82625 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;