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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCFB0C4363A for ; Thu, 29 Oct 2020 15:13:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 876F4207DE for ; Thu, 29 Oct 2020 15:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728025AbgJ2PNM (ORCPT ); Thu, 29 Oct 2020 11:13:12 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:52460 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727026AbgJ2PNM (ORCPT ); Thu, 29 Oct 2020 11:13:12 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kY9bv-004BLg-Hn; Thu, 29 Oct 2020 16:13:07 +0100 Date: Thu, 29 Oct 2020 16:13:07 +0100 From: Andrew Lunn To: David Laight , Arnd Bergmann Cc: Jakub Kicinski , netdev , Thomas Petazzoni , Ralf Baechle Subject: Re: [PATCH net-next 2/2] net: rose: Escape trigraph to fix warning with W=1 Message-ID: <20201029151307.GP878328@lunn.ch> References: <20201028002235.928999-1-andrew@lunn.ch> <20201028002235.928999-3-andrew@lunn.ch> <294bfee65035493fac1e2643a5e360d5@AcuMS.aculab.com> <20201029143121.GN878328@lunn.ch> <2c3145a577f84e96b2ec7be15db90331@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2c3145a577f84e96b2ec7be15db90331@AcuMS.aculab.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Oct 29, 2020 at 02:52:52PM +0000, David Laight wrote: > From: Andrew Lunn > > Sent: 29 October 2020 14:31 > > On Thu, Oct 29, 2020 at 02:19:27PM +0000, David Laight wrote: > > > From: Andrew Lunn > > > > Sent: 28 October 2020 00:23 > > > > > > > > net/rose/af_rose.c: In function ‘rose_info_show’: > > > > net/rose/af_rose.c:1413:20: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs] > > > > 1413 | callsign = "??????-?"; > > > > > > > > ??- is a trigraph, and should be replaced by a ˜ by the > > > > compiler. However, trigraphs are being ignored in the build. Fix the > > > > warning by escaping the ?? prefix of a trigraph. > > > > > > > > Signed-off-by: Andrew Lunn > > > > --- > > > > net/rose/af_rose.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c > > > > index cf7d974e0f61..2c297834d268 100644 > > > > --- a/net/rose/af_rose.c > > > > +++ b/net/rose/af_rose.c > > > > @@ -1410,7 +1410,7 @@ static int rose_info_show(struct seq_file *seq, void *v) > > > > ax2asc(buf, &rose->dest_call)); > > > > > > > > if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) > > > > - callsign = "??????-?"; > > > > + callsign = "????\?\?-?"; > > > > > > I think I'd just split the string, eg: "?????" "-?". > > > > Humm. I think we need a language lawyer. > > > > Does it concatenate the strings and then evaluate for trigraphs? Or > > does it evaluate for trigraphs, and then concatenate the strings? > > I'm 99.9999% sure trigraphs are evaluated before string concatenation. > > Although trigraphs are such a stupid idea I'd be tempted to just > turn the warning off. > There is good reason why they are ignored by default. Hi Arnd I think this trigraph issues popped up because of one of the changes you have in your playground, adding more warnings. What do you think of disabling the trigraph warning as well as disabling trigraphs themselves? Andrew