With GCC 13.1 and W=1 brcmfmac has warnings like this:
./include/trace/perf.h:26:16: warning: function 'perf_trace_brcmf_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
Add a workaround which disables -Wsuggest-attribute=format in tracepoint.h. I
see similar workarounds in other drivers as well.
Compile tested only.
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230613140918.389690-2-kvalo@kernel.org
#define MAX_MSG_LEN 100
+#pragma GCC diagnostic push
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
+#endif
+
TRACE_EVENT(brcmf_err,
TP_PROTO(const char *func, struct va_format *vaf),
TP_ARGS(func, vaf),
__entry->len, ((u8 *)__get_dynamic_array(hdr))[4])
);
+#pragma GCC diagnostic pop
+
#ifdef CONFIG_BRCM_TRACING
#undef TRACE_INCLUDE_PATH