From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22683 invoked by alias); 17 Oct 2010 10:02:19 -0000 Received: (qmail 22674 invoked by uid 22791); 17 Oct 2010 10:02:19 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 17 Oct 2010 10:02:12 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id E0E1B1C000BC; Sun, 17 Oct 2010 12:02:09 +0200 (CEST) X-Auth-Info: Ww84Jd0fHKCchfzuyVqbvKfeGEEJ+rZrCcykCF4j1X8= Received: from whitebox.home (ppp-93-104-152-128.dynamic.mnet-online.de [93.104.152.128]) by mail.mnet-online.de (Postfix) with ESMTPA id 5BE581C00139; Sun, 17 Oct 2010 12:02:09 +0200 (CEST) Received: by whitebox.home (Postfix, from userid 501) id CA8DA1E5306; Sun, 17 Oct 2010 12:02:08 +0200 (CEST) From: Andreas Schwab To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [obv] varobj.c: Fix GCC false warning References: <20101017084541.GA32723@host1.dyn.jankratochvil.net> X-Yow: Hmmm... a PINHEAD, during an EARTHQUAKE, encounters an ALL-MIDGET FIDDLE ORCHESTRA... ha.. ha.. Date: Sun, 17 Oct 2010 10:02:00 -0000 In-Reply-To: <20101017084541.GA32723@host1.dyn.jankratochvil.net> (Jan Kratochvil's message of "Sun, 17 Oct 2010 10:45:41 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-10/txt/msg00271.txt.bz2 Jan Kratochvil 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."