From 31aba06f31d348be54adb50195af858baff6256f Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 6 Dec 2011 19:57:47 +0000 Subject: [PATCH] * linespec.c (decode_dollar): Avoid "may be used uninitialized" warning. --- gdb/ChangeLog | 4 ++++ gdb/linespec.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ece06e9..ffecf05 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-12-06 Doug Evans + + * linespec.c (decode_dollar): Avoid "may be used uninitialized" warning. + 2011-12-06 Joel Brobecker * language.h (struct language_defn): Add new component diff --git a/gdb/linespec.c b/gdb/linespec.c index e6e863d..f3afc58 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -2494,6 +2494,10 @@ decode_dollar (struct linespec_state *self, char *copy) volatile struct gdb_exception exc; + /* Avoid "may be used uninitialized" warning. */ + values.sals = NULL; + values.nelts = 0; + TRY_CATCH (exc, RETURN_MASK_ERROR) { values = decode_variable (self, copy); -- 2.7.4