From patchwork Thu Dec 12 17:51:17 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: 36788 Received: (qmail 18188 invoked by alias); 12 Dec 2019 17:56:54 -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 18177 invoked by uid 89); 12 Dec 2019 17:56:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2195 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; Thu, 12 Dec 2019 17:56:52 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id B1E8C203AF; Thu, 12 Dec 2019 12:51:27 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id CF9B120480; Thu, 12 Dec 2019 12:51:18 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id B1CA325BB4; Thu, 12 Dec 2019 12:51:18 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Thu, 12 Dec 2019 12:51:17 -0500 From: "Tom Tromey (Code Review)" To: Pedro Alves , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: newpatchset Subject: [review v2] Suppress ARI warnings for vsprintf X-Gerrit-Change-Id: Ia8665aa5d7b7331a3985b18626b19764a264447b X-Gerrit-Change-Number: 747 X-Gerrit-ChangeURL: X-Gerrit-Commit: 1e9f4ecb8989fbbf963e59200f7ad88eaa937f85 In-Reply-To: References: Reply-To: 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: <20191212175118.B1CA325BB4@gnutoolchain-gerrit.osci.io> 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. 2019-12-05 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 709bd27..92d76fa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-12-05 Tom Tromey + + * gdbsupport/common-utils.c (string_printf, string_vprintf) + (string_vappendf): Add ARI comment. + 2019-12-12 Tom Tromey * contrib/ari/gdb_ari.sh: Remove "fix" call for 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 *