From patchwork Thu Oct 29 17:36:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 9470 Received: (qmail 64049 invoked by alias); 29 Oct 2015 17:36:59 -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 63972 invoked by uid 89); 29 Oct 2015 17:36:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 29 Oct 2015 17:36:57 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 55E235BA0C; Thu, 29 Oct 2015 17:36:56 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9THallH001205; Thu, 29 Oct 2015 13:36:51 -0400 Message-ID: <5632592D.3070000@redhat.com> Date: Thu, 29 Oct 2015 17:36:45 +0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Simon Marchi Subject: Re: [PATCH] guile/: Add enum casts References: <1446058487-22472-1-git-send-email-palves@redhat.com> In-Reply-To: <1446058487-22472-1-git-send-email-palves@redhat.com> On 10/28/2015 06:54 PM, Pedro Alves wrote: > In both cases the casts looks appropriate to me. In the > gdbscm_disasm_memory_error case, the status is marshaled through the > opcodes disassemble interface. In the > gdbscm_unwind_stop_reason_string case, the int comes from Guile. > > gdb/ChangeLog: > 2015-10-28 Pedro Alves > > * guile/scm-disasm.c (gdbscm_disasm_memory_error): Add cast. > * guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Add cast. I split out the second hunk and pushed it in as an obvious change. -------- From: Pedro Alves Subject: [PATCH] guile/: Add enum cast gdb/ChangeLog: 2015-10-29 Pedro Alves * guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Add cast. --- gdb/ChangeLog | 4 ++++ gdb/guile/scm-frame.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 000566e..9433221 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-10-29 Pedro Alves + + * guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Add cast. + 2015-10-29 Eli Zaretskii * utils.c (init_page_info): Disable paging if INSIDE_EMACS is set diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c index 24e26e8..55e0faf 100644 --- a/gdb/guile/scm-frame.c +++ b/gdb/guile/scm-frame.c @@ -1045,7 +1045,7 @@ gdbscm_unwind_stop_reason_string (SCM reason_scm) if (reason < UNWIND_FIRST || reason > UNWIND_LAST) scm_out_of_range (FUNC_NAME, reason_scm); - str = unwind_stop_reason_to_string (reason); + str = unwind_stop_reason_to_string ((enum unwind_stop_reason) reason); return gdbscm_scm_from_c_string (str); }