From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26866 invoked by alias); 19 Dec 2012 17:55:23 -0000 Received: (qmail 26858 invoked by uid 22791); 19 Dec 2012 17:55:23 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Dec 2012 17:55:16 +0000 Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id qBJHtBff071727 for ; Wed, 19 Dec 2012 18:55:13 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <50D1FF7F.7060303@fgznet.ch> Date: Wed, 19 Dec 2012 17:55:00 -0000 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [patch] make older gcc happy mips-tdep.c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-12/txt/msg00710.txt.bz2 Hello, while trying to build a gdb with --enable-targets=all I found the below. The warning is about 'branch_bp might be uninitialized...' I compile this on FreeBSD where the system compiler is gcc-4.2.1. Is the below ok to commit? TIA, Andreas 2012-12-19 Andreas Tobler * mips-tdep.c (mips_deal_with_atomic_sequence): Initialize branch_bp to keep gcc happy. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.564 diff -u -r1.564 mips-tdep.c --- mips-tdep.c 12 Nov 2012 21:59:07 -0000 1.564 +++ mips-tdep.c 19 Dec 2012 17:51:35 -0000 @@ -3695,7 +3695,8 @@ { CORE_ADDR breaks[2] = {-1, -1}; CORE_ADDR loc = pc; - CORE_ADDR branch_bp; /* Breakpoint at branch instruction's destination. */ + CORE_ADDR branch_bp = 0; /* Breakpoint at branch instruction's + destination. */ ULONGEST insn; int insn_count; int index;