From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30F96C67871 for ; Tue, 25 Oct 2022 01:27:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231587AbiJYB07 (ORCPT ); Mon, 24 Oct 2022 21:26:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbiJYB0e (ORCPT ); Mon, 24 Oct 2022 21:26:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB6F12761; Mon, 24 Oct 2022 18:00:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D3983616D5; Tue, 25 Oct 2022 01:00:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8835AC433D6; Tue, 25 Oct 2022 01:00:20 +0000 (UTC) Date: Mon, 24 Oct 2022 21:00:31 -0400 From: Steven Rostedt To: "Chen, Rong A" Cc: kernel test robot , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Gregory Greenman , 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 Message-ID: <20221024210031.3747fe18@gandalf.local.home> In-Reply-To: References: <202210212134.QTpb11ug-lkp@intel.com> <20221021101026.1708a426@gandalf.local.home> <20221024103524.43e13ab3@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 25 Oct 2022 08:49:41 +0800 "Chen, Rong A" 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 #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