Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Mar 2024 18:11:43 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ad9aa0685925 - stable/14 - ktrace: Add __ktrace_used
Message-ID:  <202403291811.42TIBhLv077924@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

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

commit ad9aa0685925a1297fc7683e2a178dec419fe3e6
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-03-09 05:08:43 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-03-29 13:53:04 +0000

    ktrace: Add __ktrace_used
    
    This suppresses warnings about write-only variables when the KTRACE
    option is disabled, akin __diagused and __witness_used.
    
    MFC after:      1 week
    
    (cherry picked from commit cce4979133ba540ca2dfd57631c6f91673b9bafd)
---
 sys/sys/ktrace.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
index 110e14698570..594f912b02ef 100644
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -336,8 +336,10 @@ void	ktrcapfail(enum ktr_cap_fail_type, const cap_rights_t *,
 extern u_int ktr_geniosize;
 #ifdef	KTRACE
 extern int ktr_filesize_limit_signal;
+#define	__ktrace_used
 #else
 #define	ktr_filesize_limit_signal 0
+#define	__ktrace_used	__unused
 #endif
 #else
 



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