From patchwork Thu Aug 30 21:58:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Seitz X-Patchwork-Id: 29141 Received: (qmail 90033 invoked by alias); 30 Aug 2018 21:58:49 -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 90020 invoked by uid 89); 30 Aug 2018 21:58:48 -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, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Aug 2018 21:58:47 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72E383086241 for ; Thu, 30 Aug 2018 21:58:46 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 405C86DAF7 for ; Thu, 30 Aug 2018 21:58:46 +0000 (UTC) From: Keith Seitz To: gdb-patches@sourceware.org Subject: [PATCH] Fix ARI violations in c++compile Date: Thu, 30 Aug 2018 14:58:45 -0700 Message-Id: <20180830215845.12213-1-keiths@redhat.com> X-IsSubscribed: yes This patch fixes two violations of the ARI (use of ATTRIBUTE_UNUSED and "%ll"). gdb/ChangeLog * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use pulongest instead of "%lld". * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove ATTRIBUTE_UNUSED. --- gdb/ChangeLog | 7 +++++++ gdb/compile/compile-cplus-symbols.c | 2 +- gdb/compile/compile-cplus-types.c | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0d55fd45f5..7e62e8aa8c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +YYYY-MM-DD Keith Seitz + + * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use + pulongest instead of "%lld". + * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove + ATTRIBUTE_UNUSED. + 2018-08-30 Andrew Burgess * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd, diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index 0f849fe365..234b97783b 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -335,7 +335,7 @@ convert_symbol_bmsym (compile_cplus_instance *instance, void gcc_cplus_convert_symbol (void *datum, struct gcc_cp_context *gcc_context, - enum gcc_cp_oracle_request request ATTRIBUTE_UNUSED, + enum gcc_cp_oracle_request request, const char *identifier) { if (compile_debug) diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 7fc413606e..271cc665f8 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -1244,9 +1244,9 @@ compile_cplus_instance::gcc_cplus_leave_scope gcc_decl. */ static void -compile_cplus_debug_output_1 (gcc_type arg) +compile_cplus_debug_output_1 (ULONGEST arg) { - fprintf_unfiltered (gdb_stdlog, "%lld", arg); + fprintf_unfiltered (gdb_stdlog, "%s", pulongest (arg)); } static void