From: asmwarrior <asmwarrior@gmail.com>
To: gdb-patches@sourceware.org
Subject: [msys+mingw] build error [-Werror=uninitialized]
Date: Fri, 16 Mar 2012 01:56:00 -0000 [thread overview]
Message-ID: <4F629DE1.8060002@gmail.com> (raw)
I see the build error in the latest cvs:
mingw32-gcc -g -O2 -D__USE_MINGW_ACCESS -I. -I../../gdb/gdb -I../../gdb/gdb/common -I../../gdb/gdb/config -DLOCALEDIR="\"/mingw/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/gdb/../include/opcode -I../../gdb/gdb/../opcodes/.. -I../../gdb/gdb/../readline/.. -I../bfd -I../../gdb/gdb/../bfd -I../../gdb/gdb/../include -I../libdecnumber -I../../gdb/gdb/../libdecnumber -I../../gdb/gdb/gnulib -Ignulib -IE:/code/python272/include -IE:/code/python272/include -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wno-format -Werror -c -o gnu-v3-abi.o -MT gnu-v3-abi.o -MMD -MP -MF .deps/gnu-v3-abi.Tpo ../../gdb/gdb/gnu-v3-abi.c
../../gdb/gdb/gnu-v3-abi.c: In function 'print_one_vtable.isra.2':
../../gdb/gdb/gnu-v3-abi.c:892:33: error: 'addr' may be used uninitialized in this function [-Werror=uninitialized]
cc1.exe: all warnings being treated as errors
make[2]: *** [gnu-v3-abi.o] Error 1
So, I think it can be quickly fixed by using:
CORE_ADDR addr = 0;
Is this correct? I see the addr is used in the try catch block:
TRY_CATCH (ex, RETURN_MASK_ERROR)
{
addr = value_as_address (vfn);
}
if (ex.reason < 0)
printf_filtered (_("<error: %s>"), ex.message);
else
print_function_pointer_address (gdbarch, addr, gdb_stdout,
opts->addressprint);
Not sure why it still report such error.
Yuanhui Zhang
next reply other threads:[~2012-03-16 1:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 1:56 asmwarrior [this message]
2012-03-16 7:26 ` Yao Qi
2012-03-16 7:31 ` asmwarrior
2012-03-16 7:45 ` Yao Qi
2012-03-16 8:19 ` [commit] " Jan Kratochvil
2012-03-16 8:23 ` asmwarrior
2012-03-16 14:09 ` asmwarrior
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=4F629DE1.8060002@gmail.com \
--to=asmwarrior@gmail.com \
--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