lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221024210031.3747fe18@gandalf.local.home>
Date:   Mon, 24 Oct 2022 21:00:31 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     "Chen, Rong A" <rong.a.chen@...el.com>
Cc:     kernel test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Gregory Greenman <gregory.greenman@...el.com>,
        linux-wireless@...r.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

On Tue, 25 Oct 2022 08:49:41 +0800
"Chen, Rong A" <rong.a.chen@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ