From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72490 invoked by alias); 28 Oct 2015 18:54:52 -0000 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 Received: (qmail 72475 invoked by uid 89); 28 Oct 2015 18:54:51 -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; Wed, 28 Oct 2015 18:54:49 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id C63AA83F91; Wed, 28 Oct 2015 18:54:48 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9SIslKB020486; Wed, 28 Oct 2015 14:54:47 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] guile/: Add enum casts Date: Thu, 29 Oct 2015 12:31:00 -0000 Message-Id: <1446058487-22472-1-git-send-email-palves@redhat.com> X-SW-Source: 2015-10/txt/msg00666.txt.bz2 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. --- gdb/guile/scm-disasm.c | 2 +- gdb/guile/scm-frame.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/guile/scm-disasm.c b/gdb/guile/scm-disasm.c index 78b38df..0cc2f84 100644 --- a/gdb/guile/scm-disasm.c +++ b/gdb/guile/scm-disasm.c @@ -133,7 +133,7 @@ static void gdbscm_disasm_memory_error (int status, bfd_vma memaddr, struct disassemble_info *info) { - memory_error (status, memaddr); + memory_error ((enum target_xfer_status) status, memaddr); } /* disassemble_info.print_address_func for gdbscm_print_insn_from_port. 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); } -- 1.9.3