aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2023-04-11 17:56:16 +0000
committerBrian Behlendorf <[email protected]>2023-04-20 10:31:01 -0700
commit135d9a9048e3716c755373182720d0eba170285f (patch)
tree5e1a61ea735a30a339abaefd4c4b1b7452bf424d
parentab71b24d20df7ec59c6b3a2b560af263ad262d9b (diff)
Linux: Suppress -Wordered-compare-function-pointers in tracepoint code
Clang points out that there is a comparison against -1, but we cannot fix it because that is from the kernel headers, which we must support. We can workaround this by using a pragma. Sponsored-By: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #14738
-rw-r--r--include/os/linux/zfs/sys/trace_zil.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/os/linux/zfs/sys/trace_zil.h b/include/os/linux/zfs/sys/trace_zil.h
index 6dd18c597..fb03d3149 100644
--- a/include/os/linux/zfs/sys/trace_zil.h
+++ b/include/os/linux/zfs/sys/trace_zil.h
@@ -152,6 +152,9 @@
* zilog_t *, ...,
* itx_t *, ...);
*/
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wordered-compare-function-pointers"
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_zil_process_itx_class,
TP_PROTO(zilog_t *zilog, itx_t *itx),
@@ -169,6 +172,7 @@ DECLARE_EVENT_CLASS(zfs_zil_process_itx_class,
ZILOG_TP_PRINTK_ARGS, ITX_TP_PRINTK_ARGS)
);
/* END CSTYLED */
+#pragma clang diagnostic pop
#define DEFINE_ZIL_PROCESS_ITX_EVENT(name) \
DEFINE_EVENT(zfs_zil_process_itx_class, name, \