From patchwork Fri Dec 13 22:17:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36858 Received: (qmail 88853 invoked by alias); 13 Dec 2019 22:23:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 88785 invoked by uid 89); 13 Dec 2019 22:23:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2019 22:23:17 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 65512204A6; Fri, 13 Dec 2019 17:17:22 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id D561820A75; Fri, 13 Dec 2019 17:17:09 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id C178E28175; Fri, 13 Dec 2019 17:17:09 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Fri, 13 Dec 2019 17:17:09 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Cc: Pedro Alves Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Suppress ARI warnings for vsprintf X-Gerrit-Change-Id: Ia8665aa5d7b7331a3985b18626b19764a264447b X-Gerrit-Change-Number: 747 X-Gerrit-ChangeURL: X-Gerrit-Commit: 3cb5a3a16af2cae1a5059b7571c514b3fa575df9 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, palves@redhat.com, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191213221709.C178E28175@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/747 ...................................................................... Suppress ARI warnings for vsprintf A few spots can validly call vsprintf; this adds ARI markers to suppress warnings at these places. gdb/ChangeLog 2019-12-13 Tom Tromey * gdbsupport/common-utils.c (string_printf, string_vprintf) (string_vappendf): Add ARI comment. Change-Id: Ia8665aa5d7b7331a3985b18626b19764a264447b --- M gdb/ChangeLog M gdb/gdbsupport/common-utils.c 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d107b6c..0e1f484 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2019-12-13 Tom Tromey + * gdbsupport/common-utils.c (string_printf, string_vprintf) + (string_vappendf): Add ARI comment. + +2019-12-13 Tom Tromey + * contrib/ari/gdb_ari.sh: Remove "fix" call for floatformat_to_double. * target-float.c (host_float_ops::from_target): Add ARI diff --git a/gdb/gdbsupport/common-utils.c b/gdb/gdbsupport/common-utils.c index d1059de..33f9bf6a 100644 --- a/gdb/gdbsupport/common-utils.c +++ b/gdb/gdbsupport/common-utils.c @@ -89,7 +89,7 @@ /* C++11 and later guarantee std::string uses contiguous memory and always includes the terminating '\0'. */ va_start (vp, fmt); - vsprintf (&str[0], fmt, vp); + vsprintf (&str[0], fmt, vp); /* ARI: vsprintf */ va_end (vp); return str; @@ -111,7 +111,7 @@ /* C++11 and later guarantee std::string uses contiguous memory and always includes the terminating '\0'. */ - vsprintf (&str[0], fmt, args); + vsprintf (&str[0], fmt, args); /* ARI: vsprintf */ return str; } @@ -147,7 +147,7 @@ /* C++11 and later guarantee std::string uses contiguous memory and always includes the terminating '\0'. */ - vsprintf (&str[curr_size], fmt, args); + vsprintf (&str[curr_size], fmt, args); /* ARI: vsprintf */ } char *