From 012829df0c99d843c9c873b9be57796eaecb155b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 2 May 2023 09:21:47 -0700 Subject: [PATCH] Wrap clang specific pragma Clang specific pragmas need to be wrapped to prevent a build warning when compiling with gcc. Reviewed-by: Tino Reichardt Signed-off-by: Brian Behlendorf Closes #14814 --- include/os/linux/zfs/sys/trace_zil.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/os/linux/zfs/sys/trace_zil.h b/include/os/linux/zfs/sys/trace_zil.h index fb03d3149f..7bddd9d1f4 100644 --- a/include/os/linux/zfs/sys/trace_zil.h +++ b/include/os/linux/zfs/sys/trace_zil.h @@ -153,8 +153,10 @@ * itx_t *, ...); */ +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wordered-compare-function-pointers" +#endif /* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_zil_process_itx_class, TP_PROTO(zilog_t *zilog, itx_t *itx), @@ -172,7 +174,9 @@ DECLARE_EVENT_CLASS(zfs_zil_process_itx_class, ZILOG_TP_PRINTK_ARGS, ITX_TP_PRINTK_ARGS) ); /* END CSTYLED */ +#if defined(__clang__) #pragma clang diagnostic pop +#endif #define DEFINE_ZIL_PROCESS_ITX_EVENT(name) \ DEFINE_EVENT(zfs_zil_process_itx_class, name, \