Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2023 17:31:57 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9a93b6cf3dd9 - main - zfs: Disable -Wunused-variable for environ in main in zfs_main.c.
Message-ID:  <202301301731.30UHVvsj058861@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=9a93b6cf3dd97ca7bcb938f87afeb523d023f807

commit 9a93b6cf3dd97ca7bcb938f87afeb523d023f807
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-01-30 17:31:19 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-01-30 17:31:19 +0000

    zfs: Disable -Wunused-variable for environ in main in zfs_main.c.
    
    There is an extern declaration of the global variable environ (which
    has no portable header that defines it) that is unused on FreeBSD due
    to zfs_setproctitle_init() being a stub.
    
    Reviewed by:    emaste
    Reported by:    GCC
    Differential Revision:  https://reviews.freebsd.org/D38231
---
 cddl/sbin/zfs/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 0babca17e98a..aae341f13211 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -77,3 +77,5 @@ CFLAGS+= \
 LIBADD=	jail avl nvpair geom  uutil zfs_core spl tpool zutil zfs m crypto
 LDADD+=	-pthread
 .include <bsd.prog.mk>
+
+CWARNFLAGS.zfs_main.c+=	-Wno-unused-variable



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301301731.30UHVvsj058861>