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 C6623C56201 for ; Thu, 29 Oct 2020 14:31:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F2742087D for ; Thu, 29 Oct 2020 14:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbgJ2ObZ (ORCPT ); Thu, 29 Oct 2020 10:31:25 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:52318 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726344AbgJ2ObZ (ORCPT ); Thu, 29 Oct 2020 10:31:25 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kY8xV-004Av3-2B; Thu, 29 Oct 2020 15:31:21 +0100 Date: Thu, 29 Oct 2020 15:31:21 +0100 From: Andrew Lunn To: David Laight 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: <20201029143121.GN878328@lunn.ch> References: <20201028002235.928999-1-andrew@lunn.ch> <20201028002235.928999-3-andrew@lunn.ch> <294bfee65035493fac1e2643a5e360d5@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <294bfee65035493fac1e2643a5e360d5@AcuMS.aculab.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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? Andrew