aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/gdb-python.exp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-06-05 11:12:57 -0600
committerTom Tromey <tom@tromey.com>2022-06-10 14:27:54 -0600
commit2cbde639ae207987fa169ad5ed70e53c11ecdcba (patch)
tree9f98c587a9a53ebed49cd5886fec1a53c3f93844 /gdb/testsuite/lib/gdb-python.exp
parentcbc30d36acfb3f20f7736c5594d81088ae8e4e13 (diff)
downloadgdb-2cbde639ae207987fa169ad5ed70e53c11ecdcba.zip
gdb-2cbde639ae207987fa169ad5ed70e53c11ecdcba.tar.gz
gdb-2cbde639ae207987fa169ad5ed70e53c11ecdcba.tar.bz2
Fix warning-avoidance initialization in xcoffread.c
With the registry rewrite series, on Fedora 34, I started seeing this error in xcoffread.c: ../../binutils-gdb/gdb/xcoffread.c: In function ‘void read_xcoff_symtab(objfile*, legacy_psymtab*)’: ../../binutils-gdb/gdb/xcoffread.c:948:25: error: ‘main_aux’ is used uninitialized [-Werror=uninitialized] 948 | union internal_auxent fcn_aux_saved = main_aux; | ^~~~~~~~~~~~~ ../../binutils-gdb/gdb/xcoffread.c:933:25: note: ‘main_aux’ declared here 933 | union internal_auxent main_aux; | ^~~~~~~~ I don't know why this error started suddenly... that seems weird, because it's not obviously related to the changes I made. Looking into it, it seems this line was intended to avoid a similar warning -- but since 'main_aux' is uninitialized at the point where it is used, this fix was incomplete. This patch avoids the warning by initializing using "{}". I'm checking this in.
Diffstat (limited to 'gdb/testsuite/lib/gdb-python.exp')
0 files changed, 0 insertions, 0 deletions