Linux wireless drivers development
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Chen, Rong A" <rong.a.chen@intel.com>
Cc: kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Gregory Greenman <gregory.greenman@intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [kbuild-all] Re: include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute
Date: Mon, 24 Oct 2022 21:00:31 -0400	[thread overview]
Message-ID: <20221024210031.3747fe18@gandalf.local.home> (raw)
In-Reply-To: <b612432e-7f21-4c79-5553-35ad7bdc6fd2@intel.com>

On Tue, 25 Oct 2022 08:49:41 +0800
"Chen, Rong A" <rong.a.chen@intel.com> wrote:

> > For any build that fails on warnings, that specific warning needs to be
> > silenced.
> > 
> > I mean, "-Werror=suggest-attribute=format", really?  
> 
> yes, it's compiled with -Werror if using 'W=1' option:
> 
>  >>>>>> include/trace/trace_events.h:261:16: error: function   
> 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 
> 'gnu_printf' format attribute [-Werror=suggest-attribute=format]

Is there a way we can silent this particular error when W=1?

Ooh! Doing a search of this I found:

include/trace/events/qla.h:#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"

Perhaps I should just make that part of trace_events.h ?

-- Steve

(untested)

diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
index c2f9cabf154d..63db95559647 100644
--- a/include/trace/trace_events.h
+++ b/include/trace/trace_events.h
@@ -18,6 +18,11 @@
  * in the structure.
  */
 
+#pragma GCC diagnostic push
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
+#endif
+
 #include <linux/trace_events.h>
 
 #ifndef TRACE_SYSTEM_VAR
@@ -467,3 +472,5 @@ static struct trace_event_call __used					\
 __section("_ftrace_events") *__event_##call = &event_##call
 
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
+
+#pragma GCC diagnostic pop

      reply	other threads:[~2022-10-25  1:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202210212134.QTpb11ug-lkp@intel.com>
     [not found] ` <20221021101026.1708a426@gandalf.local.home>
     [not found]   ` <ed665ca3-fa87-fee6-7284-9aed257264e4@intel.com>
2022-10-24 14:35     ` [kbuild-all] Re: include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute Steven Rostedt
2022-10-25  0:49       ` Chen, Rong A
2022-10-25  1:00         ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221024210031.3747fe18@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=gregory.greenman@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rong.a.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox