Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>,
	Tom Tromey <tromey@redhat.com>,  	Eli Zaretskii <eliz@gnu.org>
Subject: Re: [python][patch] And range method to type
Date: Wed, 09 Dec 2009 07:56:00 -0000	[thread overview]
Message-ID: <daef60380912082356t2034e055y5c7f2284065824d6@mail.gmail.com> (raw)
In-Reply-To: <4B1F5744.6090209@redhat.com>

It's OK now.  Thanks.

My gcc is:
gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-targets=all --enable-checking=release
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)


Hui

On Wed, Dec 9, 2009 at 15:52, Phil Muldoon <pmuldoon@redhat.com> wrote:
> On 12/09/2009 03:00 AM, Hui Zhu wrote:
>> cc1: warnings being treated as errors
>> ../../src/gdb/python/py-type.c: In function 'typy_range':
>> ../../src/gdb/python/py-type.c:285: warning: 'high' may be used
>> uninitialized in this function
>> ../../src/gdb/python/py-type.c:285: warning: 'low' may be used
>> uninitialized in this function
>> make[2]: *** [py-type.o] Error 1
>> make[2]: Leaving directory `/home/teawater/gdb/cvs/bgdb/gdb'
>> make[1]: *** [all-gdb] Error 2
>> make[1]: Leaving directory `/home/teawater/gdb/cvs/bgdb'
>> make: *** [all] Error 2
>
>
> I've checked in the following patch under the obvious rule to appease
> these warnings.  I do not see them on my compiler, but it looks like
> some versions might trigger the (bogus, imo ;) warning:
>
>
> --
>
> Index: python/py-type.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/python/py-type.c,v
> retrieving revision 1.4
> diff -u -r1.4 py-type.c
> --- python/py-type.c    8 Dec 2009 14:06:02 -0000       1.4
> +++ python/py-type.c    9 Dec 2009 07:47:34 -0000
> @@ -282,7 +282,8 @@
>   struct type *type = ((type_object *) self)->type;
>   PyObject *result;
>   PyObject *low_bound = NULL, *high_bound = NULL;
> -  LONGEST low, high;
> +  /* Initialize these to appease GCC warnings.  */
> +  LONGEST low = 0, high = 0;
>


      reply	other threads:[~2009-12-09  7:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 15:25 Phil Muldoon
2009-12-04 15:32 ` Eli Zaretskii
2009-12-04 17:10   ` Phil Muldoon
2009-12-04 19:30     ` Eli Zaretskii
2009-12-04 17:19 ` Joel Brobecker
2009-12-04 18:13 ` Tom Tromey
2009-12-05  9:19   ` Phil Muldoon
2009-12-05  9:22     ` Eli Zaretskii
2009-12-07 19:54     ` Tom Tromey
2009-12-08 14:14       ` Phil Muldoon
2009-12-09  3:00         ` Hui Zhu
2009-12-09  7:47           ` Phil Muldoon
2009-12-09 11:27             ` Eli Zaretskii
2009-12-09 11:41               ` Andreas Schwab
2009-12-09  7:52           ` Phil Muldoon
2009-12-09  7:56             ` Hui Zhu [this message]

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=daef60380912082356t2034e055y5c7f2284065824d6@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=tromey@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