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
This commit is contained in:
Warner Losh 2017-12-03 04:55:33 +00:00
parent f8bb886226
commit f5b24e1c9f
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -250,7 +250,7 @@ zio_checksum_template_init(enum zio_checksum checksum, spa_t *spa)
* 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 *bp, void *data)
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];
}