git: a95c70012bc3 - main - zfs: Disable -Wunused-but-set-variable for dnode.c.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Apr 2022 23:09:28 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a95c70012bc318af325c1cc6da2fbea305d8afa4 commit a95c70012bc318af325c1cc6da2fbea305d8afa4 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-13 23:08:20 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-13 23:08:20 +0000 zfs: Disable -Wunused-but-set-variable for dnode.c. dn is only used by DNODE_VERIFY (conditional on ZFS_DEBUG) in dnode_special_open. --- sys/conf/files | 2 +- sys/modules/zfs/Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 44b3982c0edb..e90e3e0ac5b7 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -266,7 +266,7 @@ contrib/openzfs/module/zfs/dmu_send.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/dmu_traverse.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/dmu_tx.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/dmu_zfetch.c optional zfs compile-with "${ZFS_C}" -contrib/openzfs/module/zfs/dnode.c optional zfs compile-with "${ZFS_C}" \ +contrib/openzfs/module/zfs/dnode.c optional zfs compile-with "${ZFS_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" \ warning "kernel contains CDDL licensed ZFS filesystem" contrib/openzfs/module/zfs/dnode_sync.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/dsl_bookmark.c optional zfs compile-with "${ZFS_C}" diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 086d10a23730..510511a3e118 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -339,6 +339,7 @@ CFLAGS.zprop_common.c= -Wno-cast-qual CFLAGS.ddt.c= -Wno-cast-qual CFLAGS.dmu.c= -Wno-cast-qual CFLAGS.dmu_traverse.c= -Wno-cast-qual +CFLAGS.dnode.c+= ${NO_WUNUSED_BUT_SET_VARIABLE} CFLAGS.dsl_dir.c= -Wno-cast-qual CFLAGS.dsl_deadlist.c= -Wno-cast-qual CFLAGS.dsl_prop.c= -Wno-cast-qual