From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20066 invoked by alias); 8 Mar 2014 05:28:14 -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 20051 invoked by uid 89); 8 Mar 2014 05:28:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 08 Mar 2014 05:28:12 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 04D3F33FAA8; Sat, 8 Mar 2014 05:28:09 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Cc: nickc@redhat.com Subject: [PATCH 1/3] sim: msp430: fix build time warnings Date: Sat, 08 Mar 2014 05:28:00 -0000 Message-Id: <1394256493-15084-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00211.txt.bz2 This fix is simple: msp430-sim.c: In function 'maybe_perform_syscall': msp430-sim.c:898:10: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long int' [-Wformat] This one we change to use casts like everyone else does in the code base: msp430-sim.c: In function 'msp430_step_once': msp430-sim.c:985:7: warning: passing argument 3 of 'init_disassemble_info' from incompatible pointer type [enabled by default] include/dis-asm.h:368:13: note: expected 'fprintf_ftype' but argument is of type 'int (*)(struct FILE * __restrict__, const char * __restrict__)' 2014-03-08 Mike Frysinger * msp430-sim (maybe_perform_syscall): Change %d to %ld. (msp430_step_once): Cast fprintf to fprintf_ftype. --- sim/msp430/msp430-sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c index 8cd2e1e..c3fa4a9 100644 --- a/sim/msp430/msp430-sim.c +++ b/sim/msp430/msp430-sim.c @@ -895,7 +895,7 @@ maybe_perform_syscall (SIM_DESC sd, int call_addr) if (TRACE_SYSCALL_P (MSP430_CPU (sd))) trace_generic (sd, MSP430_CPU (sd), TRACE_SYSCALL_IDX, - "returns %d", sc.result); + "returns %ld", sc.result); MSP430_CPU (sd)->state.regs[12] = sc.result; return 1; @@ -982,7 +982,7 @@ msp430_step_once (SIM_DESC sd) sim_core_read_buffer (sd, MSP430_CPU (sd), 0, b, opcode_pc, opsize); - init_disassemble_info (&info, stderr, fprintf); + init_disassemble_info (&info, stderr, (fprintf_ftype) fprintf); info.private_data = sd; info.read_memory_func = msp430_dis_read; fprintf (stderr, "%#8x ", opcode_pc); -- 1.9.0