aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-10-03 16:01:12 -0600
committerTom Tromey <tom@tromey.com>2018-10-03 20:55:52 -0600
commit875e539851bb2702f3292f819e220545a8776242 (patch)
tree3c98ce55459276f9fc569ef54fcb9db3bc655174 /gdb/coffread.c
parenta4cf95167c83c0b8c9dcd55f475a3b028eb883fc (diff)
downloadgdb-875e539851bb2702f3292f819e220545a8776242.zip
gdb-875e539851bb2702f3292f819e220545a8776242.tar.gz
gdb-875e539851bb2702f3292f819e220545a8776242.tar.bz2
Avoid two uninitialized warnings from gcc
This avoids a couple of uninitialized warnings from gcc by initializing the object in question. The one in coffread.c seems like it could be a latent bug. The one in scm-value.c is harmless, but GCC can't see that. gdb/ChangeLog 2018-10-03 Tom Tromey <tom@tromey.com> * guile/scm-value.c (gdbscm_value_to_string): Initialize "buffer_contents". * coffread.c (coff_symtab_read): Initialize "newobj".
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 81465d6..623467d 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -781,7 +781,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
struct objfile *objfile)
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- struct context_stack *newobj;
+ struct context_stack *newobj = nullptr;
struct coff_symbol coff_symbol;
struct coff_symbol *cs = &coff_symbol;
static struct internal_syment main_sym;