Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Hui Zhu <teawater@gmail.com>
Subject: Re: [OB] Fix xcoffread.c build error
Date: Thu, 19 May 2011 09:59:00 -0000	[thread overview]
Message-ID: <201105191059.02173.pedro@codesourcery.com> (raw)
In-Reply-To: <BANLkTimiuS5C+bFqmM=xzG7widF+vW5ZJQ@mail.gmail.com>

On Thursday 19 May 2011 07:56:00, Hui Zhu wrote:
> gcc -g -O2   -I. -I../../src/gdb -I../../src/gdb/common
> -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
> -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
> -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd
> -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber
> -I../../src/gdb/../libdecnumber  -I../../src/gdb/gnulib -Ignulib
> -DMI_OUT=1 -DTUI=1 -DGDBTK  -Wall -Wdeclaration-after-statement
> -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused
> -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts
> -Werror -c -o xcoffread.o -MT xcoffread.o -MMD -MP -MF
> .deps/xcoffread.Tpo ../../src/gdb/xcoffread.c
> cc1: warnings being treated as errors
> ../../src/gdb/xcoffread.c: In function 'xcoff_psymtab_to_symtab_1':
> ../../src/gdb/xcoffread.c:964:25: error:
> 'fcn_aux_saved$x_sym$x_misc$x_fsize' may be used uninitialized in this
> function
> make[2]: *** [xcoffread.o] Error 1
> make[2]: Leaving directory `/home/teawater/gdb/cvs/ba/gdb'
> make[1]: *** [all-gdb] Error 2
> make[1]: Leaving directory `/home/teawater/gdb/cvs/ba'
> make: *** [all] Error 2
> 
> 2011-05-19  Hui Zhu  <teawater@gmail.com>
> 
> 	* xcoffread.c (read_xcoff_symtab): Initialize fcn_aux_saved.
> ===================================================================
> RCS file: /cvs/src/src/gdb/xcoffread.c,v
> retrieving revision 1.87
> retrieving revision 1.88
> diff -u -r1.87 -r1.88
> --- src/gdb/xcoffread.c	2011/04/19 14:33:09	1.87
> +++ src/gdb/xcoffread.c	2011/05/19 06:54:30	1.88
> @@ -961,7 +961,7 @@
>    struct coff_symbol fcn_stab_saved = { 0 };
> 
>    /* fcn_cs_saved is global because process_xcoff_symbol needs it.  */
> -  union internal_auxent fcn_aux_saved;
> +  union internal_auxent fcn_aux_saved = main_aux;

Hmm?  Initializing fcn_aux_saved with the also uninitialized 
main_aux makes the warning go away?

This appears to be hiding a real bug.

>    struct context_stack *new;
> 
>    char *filestring = " _start_ ";	/* Name of the current file.  */
> 

-- 
Pedro Alves


  reply	other threads:[~2011-05-19  9:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19  6:56 Hui Zhu
2011-05-19  9:59 ` Pedro Alves [this message]
2011-05-20  5:13   ` Hui Zhu
2011-05-24 16:28     ` Pedro Alves
2011-05-24 16:29       ` Pedro Alves
2011-05-25  7:21       ` Tristan Gingold
2011-05-25 21:01         ` Joel Brobecker

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=201105191059.02173.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=teawater@gmail.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