From nobody Tue Feb 07 17:31:35 2023 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 4PB9Cq2dHCz3nTkB; Tue, 7 Feb 2023 17:31:35 +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 4PB9Cq2CNMz4FGW; Tue, 7 Feb 2023 17:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675791095; 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=Hg/bKW2BgP0uMoNuOs70z6jrOpn8VWlMYO0aG2I3X9c=; b=McPubwB2X1DCfNn74QwUccTFSbJ10DMZeCTBni9oerQX1GdD8KHiJJOsKYwaOlsf6J06oR T0S645DgJJPJqsDVndy1SCSIGdnTiCBrW63R465eaI5gnrW9rBf/Pw+Aj1huS3h064lrIV rZRwVo7duaKgjfT2Dx3hvZkV/She68wXI4aZPpGzi6M7xAboz2hpP7Nzn3NzCFLa+7zfwK jBfqnU4Enc5hNUd8mMLmDueIp9GCXoEldp1UI+gYA7UhFkH0/zJpG+SnuBPRFV3JRKKEim Lhykvry1C3avTbWNE1F7wKfQAJ8oEK7sY8xv/SFu5Jlziv4fOp4MHCmuxvqCqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675791095; 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=Hg/bKW2BgP0uMoNuOs70z6jrOpn8VWlMYO0aG2I3X9c=; b=fIfNoP9UwXTbtjq4/VS55AeN5+gn0jzD5mU4dta4rXc0Gy12NRILNHfw1IYkXzeqAVgCaR mRrIMICZbMOOmOsXGBuvzyRcFJ/hi2uzpmjL/cmT6kgd848VJR51/L+CR0hSiJhymfsSVj 5tUoQUZlnq5nFNwh4k0AVGrTjzPF6Hr/hAeyEIWlrtQ3cbCXCgZ/bn6S74eQN6KQVYfVUo /IR/KVv92Al/tWJm+mVyRXMTR65j6xHOlBd3sC3wLFYcCfV20W6R7tKcb7+sidf5/VopDu ONtI/PNhTs0ClaJTVM/So9Fbb+mgFUr0JJb1o7AduTQ8oElFUkdTwIBjWOgS9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675791095; a=rsa-sha256; cv=none; b=Bd7VhNzVTwB7km+XmePzBZAGuJCJq1KTnXVTNK4keos0ISqBoPR7G9m5qEnAieMnmzpKfX ySZQTakrmPgkSognzVpLjjYnADzC3vZ7HU8aIV/ksFeDqM8lDovEGozPFcG/R/gHLJcm1V rPDNf6ok/67alcH3lQrSV5MyrPxa7G9ADV4iD6CCMWb4I3SCjM5O8W0oC7rT3Ze0W+BFws FOCwVP02bBRXu9b84oF0cZp/Fr0Mx8zC4tb/6afQdEVF63+KJCJP7KAZzlqSJWcoo6H1QH v7NbZ0bszEOmPa+7ey/uhesFMIn6zV39LGpsqJLjAQ0vsnXWyWC5G2IPH78Eng== 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 4PB9Cq1FsFzPgM; Tue, 7 Feb 2023 17:31:35 +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 317HVZpP004220; Tue, 7 Feb 2023 17:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 317HVZYL004219; Tue, 7 Feb 2023 17:31:35 GMT (envelope-from git) Date: Tue, 7 Feb 2023 17:31:35 GMT Message-Id: <202302071731.317HVZYL004219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 146d9da6c2ec - main - tarfs: Silence warnings when no supported compression is enabled. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 146d9da6c2ece7edbc3c0c5cca4cf64e2b9e42c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=146d9da6c2ece7edbc3c0c5cca4cf64e2b9e42c9 commit 146d9da6c2ece7edbc3c0c5cca4cf64e2b9e42c9 Author: Dag-Erling Smørgrav AuthorDate: 2023-02-07 17:27:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-07 17:31:25 +0000 tarfs: Silence warnings when no supported compression is enabled. Some of the code in sys/fs/tarfs/tarfs_io.c is not specific to zstd, but is still only used when some form of decompression is enabled. Put it behind #ifdef TARFS_ZIO to silence warnings. Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38415 --- sys/fs/tarfs/tarfs_io.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/fs/tarfs/tarfs_io.c b/sys/fs/tarfs/tarfs_io.c index 6127299b23c1..c185de8beef1 100644 --- a/sys/fs/tarfs/tarfs_io.c +++ b/sys/fs/tarfs/tarfs_io.c @@ -40,6 +40,12 @@ #include #include +#if defined(ZSTDIO) +#define TARFS_ZIO 1 +#else +#undef TARFS_ZIO +#endif + #ifdef ZSTDIO #define ZSTD_STATIC_LINKING_ONLY #include @@ -214,6 +220,7 @@ static ZSTD_customMem tarfs_zstd_mem = { }; #endif +#ifdef TARFS_ZIO /* * Updates the decompression frame index, recording the current input and * output offsets in a new index entry, and growing the index if @@ -240,6 +247,7 @@ tarfs_zio_update_index(struct tarfs_zio *zio, off_t i, off_t o) MPASS(zio->idx[zio->curidx].i == i); MPASS(zio->idx[zio->curidx].o == o); } +#endif /* * VOP_ACCESS for zio node. @@ -600,6 +608,7 @@ static struct vop_vector tarfs_znodeops = { }; VFS_VOP_VECTOR_REGISTER(tarfs_znodeops); +#ifdef TARFS_ZIO /* * Initializes the decompression layer. */ @@ -630,6 +639,7 @@ tarfs_zio_init(struct tarfs_mount *tmp, off_t i, off_t o) TARFS_DPF(ZIO, "%s: created zio node\n", __func__); return (zio); } +#endif /* * Initializes the I/O layer, including decompression if the signature of @@ -640,7 +650,7 @@ int tarfs_io_init(struct tarfs_mount *tmp) { uint8_t *block; -#ifdef ZSTDIO +#ifdef TARFS_ZIO struct tarfs_zio *zio = NULL; #endif ssize_t res; @@ -676,6 +686,7 @@ bad: return (error); } +#ifdef TARFS_ZIO /* * Tears down the decompression layer. */ @@ -712,6 +723,7 @@ tarfs_zio_fini(struct tarfs_mount *tmp) tmp->zio = NULL; return (error); } +#endif /* * Tears down the I/O layer, including the decompression layer if @@ -722,8 +734,10 @@ tarfs_io_fini(struct tarfs_mount *tmp) { int error = 0; +#ifdef TARFS_ZIO if (tmp->zio != NULL) { error = tarfs_zio_fini(tmp); } +#endif return (error); }