git: 11c549555469 - main - ext2: plug a set-but-not-used var

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Tue, 19 Apr 2022 12:46:06 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=11c549555469e4dd4e05a7b010b15a4b061fe604

commit 11c549555469e4dd4e05a7b010b15a4b061fe604
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-04-19 12:28:22 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-04-19 12:45:57 +0000

    ext2: plug a set-but-not-used var
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/fs/ext2fs/ext2_extents.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c
index 7aac71cf3fbc..3d24db4b396b 100644
--- a/sys/fs/ext2fs/ext2_extents.c
+++ b/sys/fs/ext2fs/ext2_extents.c
@@ -449,7 +449,11 @@ static int
 ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh,
     int depth)
 {
+#ifdef KDTRACE_HOOKS
 	char *error_msg;
+#else
+	char *error_msg __unused;
+#endif
 
 	if (le16toh(eh->eh_magic) != EXT4_EXT_MAGIC) {
 		error_msg = "header: invalid magic";