Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Tobler <andreast-list@fgznet.ch>
To: gdb-patches@sourceware.org
Subject: [patch] make older gcc happy mips-tdep.c
Date: Wed, 19 Dec 2012 17:55:00 -0000	[thread overview]
Message-ID: <50D1FF7F.7060303@fgznet.ch> (raw)

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  <andreast@neon.andreas.nets>

	* 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;


             reply	other threads:[~2012-12-19 17:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 17:55 Andreas Tobler [this message]
2012-12-19 19:16 ` Tom Tromey
2012-12-19 20:09   ` Andreas Tobler
2012-12-19 20:47     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D1FF7F.7060303@fgznet.ch \
    --to=andreast-list@fgznet.ch \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox