From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1612 invoked by alias); 31 May 2011 07:58:34 -0000 Received: (qmail 1601 invoked by uid 22791); 31 May 2011 07:58:33 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_50,MSGID_MULTIPLE_AT,TW_XS X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 May 2011 07:58:17 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p4V7w10I021891 ; Tue, 31 May 2011 09:58:01 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [130.79.204.10]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p4V7w0Ej045725 ; Tue, 31 May 2011 09:58:00 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p4V7w0iH049117 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Tue, 31 May 2011 09:58:00 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Joel Brobecker'" , References: <201105301916.p4UJG4N2001438@glazunov.sibelius.xs4all.nl> <20110530185933.GD2620@adacore.com> <20110530192841.GA11867@host1.jankratochvil.net> <20110530195019.GE2620@adacore.com> <20110530195910.GF2620@adacore.com> In-Reply-To: <20110530195910.GF2620@adacore.com> Subject: RE: [ARI/commit] enhance suggestion in "sprintf" rule (was: "Re: [commit] Re: New ARI warning Sat May 28 01:53:47 UTC 2011") Date: Tue, 31 May 2011 07:58:00 -0000 Message-ID: <005301cc1f68$758bae50$60a30af0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00697.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Joel Brobecker > Envoy=E9=A0: lundi 30 mai 2011 21:59 > =C0=A0: gdb-patches@sourceware.org > Objet=A0: [ARI/commit] enhance suggestion in "sprintf" rule (was: "Re: > [commit] Re: New ARI warning Sat May 28 01:53:47 UTC 2011") >=20 > > [...] I'll update the ARI documentation to mention xsnprintf > > as well - the xstrprintf suggestion really put me in target-lock mode, > > and I failed to think beyond it... >=20 > This is what I checked in. Incidently, I noticed a typo, which > I also fixed (this is the second patch). Thanks for this ARI enhancement, I did notice once that static buffers should use=20 xsnprintf function instead of xstrprintf that allocate a buffer using global memory, but forgot to change ARI doc for this rule... I hope this will facilitate reduction of the number of=20 occurrences of this warning: Currently, "Don't use sprintf" rule is found 184 times ... So please don't hesitate to fix those issues under the OBVIOUS rule! Pierre Muller as ARI maintainer