public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [obv] varobj.c: Fix GCC false warning
Date: Sun, 17 Oct 2010 10:02:00 -0000	[thread overview]
Message-ID: <m21v7p6stb.fsf@whitebox.home> (raw)
In-Reply-To: <20101017084541.GA32723@host1.dyn.jankratochvil.net> (Jan	Kratochvil's message of "Sun, 17 Oct 2010 10:45:41 +0200")

Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> --- src/gdb/varobj.c	2010/10/15 18:54:13	1.162
> +++ src/gdb/varobj.c	2010/10/17 08:43:46	1.163
> @@ -2486,7 +2486,8 @@
>    long len = 0;
>    char *encoding = NULL;
>    struct gdbarch *gdbarch = NULL;
> -  CORE_ADDR str_addr;
> +  /* Initialize it just to avoid a GCC false warning.  */
> +  CORE_ADDR str_addr = 0;
>    int string_print = 0;

What happens if string_print is set but gdbpy_extract_lazy_string was
not called?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2010-10-17 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17  8:45 Jan Kratochvil
2010-10-17 10:02 ` Andreas Schwab [this message]
2010-10-17 11:54   ` [patch] varobj.c: Reset string_print [Re: [obv] varobj.c: Fix GCC false warning] Jan Kratochvil

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=m21v7p6stb.fsf@whitebox.home \
    --to=schwab@linux-m68k.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).