From owner-svn-src-all@freebsd.org Sun Dec 3 04:55:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD11DEE1A9; Sun, 3 Dec 2017 04:55:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B67AD6AE6B; Sun, 3 Dec 2017 04:55:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34tXP0056573; Sun, 3 Dec 2017 04:55:33 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34tXEP056571; Sun, 3 Dec 2017 04:55:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34tXEP056571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326494 - in head: stand/zfs sys/cddl/boot/zfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: stand/zfs sys/cddl/boot/zfs X-SVN-Commit-Revision: 326494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:36 -0000 Author: imp Date: Sun Dec 3 04:55:33 2017 New Revision: 326494 URL: https://svnweb.freebsd.org/changeset/base/326494 Log: Mark two things as unused (since they are only sometimes used) and toss in a DECONST to remove a const in some tricky code that would require too extensive a change to unwind otherwise. Sponsored by: Netflix Modified: head/stand/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfssubr.c Modified: head/stand/zfs/zfsimpl.c ============================================================================== --- head/stand/zfs/zfsimpl.c Sun Dec 3 04:55:28 2017 (r326493) +++ head/stand/zfs/zfsimpl.c Sun Dec 3 04:55:33 2017 (r326494) @@ -43,7 +43,7 @@ struct zfsmount { objset_phys_t objset; uint64_t rootobj; }; -static struct zfsmount zfsmount; +static struct zfsmount zfsmount __unused; /* * List of all vdevs, chained through v_alllink. Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Sun Dec 3 04:55:28 2017 (r326493) +++ head/sys/cddl/boot/zfs/zfssubr.c Sun Dec 3 04:55:33 2017 (r326494) @@ -250,7 +250,7 @@ zio_checksum_template_init(enum zio_checksum checksum, * all of the checksum context templates and deallocates any that were * initialized using the algorithm-specific template init function. */ -static void +static void __unused zio_checksum_templates_free(spa_t *spa) { for (enum zio_checksum checksum = 0; @@ -284,7 +284,7 @@ zio_checksum_verify(const spa_t *spa, const blkptr_t * return (EINVAL); if (spa != NULL) { - zio_checksum_template_init(checksum, (spa_t *) spa); + zio_checksum_template_init(checksum, __DECONST(spa_t *,spa)); ctx = spa->spa_cksum_tmpls[checksum]; }