diff options
author | Tom Tromey <tom@tromey.com> | 2020-03-16 18:32:44 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-03-16 18:35:11 -0600 |
commit | 771dd3a88b1f0e03a110fc4f2207913df45f8b4b (patch) | |
tree | 2ba01980d5273e273bdccd4579f8c87b8ebdd1a6 /gdb | |
parent | 817a7585764366397879cbbedfd7e9c1454b656c (diff) | |
download | gdb-771dd3a88b1f0e03a110fc4f2207913df45f8b4b.zip gdb-771dd3a88b1f0e03a110fc4f2207913df45f8b4b.tar.gz gdb-771dd3a88b1f0e03a110fc4f2207913df45f8b4b.tar.bz2 |
Initialize base_value in pascal_object_print_value
The val_print removal series introduced a new possibly-uninitialized
warning in p-valprint.c. Examination of the code shows that the
warning does not indicate a real bug, so this patch silences the
warning by setting the variable in the catch clause of a try/catch.
(The obvious initialization did not work due to a "goto" in this
function.)
gdb/ChangeLog
2020-03-16 Tom Tromey <tom@tromey.com>
* p-valprint.c (pascal_object_print_value): Initialize
base_value.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/p-valprint.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7c50657..cfd8c5b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-03-16 Tom Tromey <tom@tromey.com> + + * p-valprint.c (pascal_object_print_value): Initialize + base_value. + 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com> Shahab Vahedi <shahab@synopsys.com> diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 35a4e59..cbd7fb7 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -739,6 +739,7 @@ pascal_object_print_value (struct value *val, struct ui_file *stream, } catch (const gdb_exception_error &ex) { + base_value = nullptr; if (ex.error == NOT_AVAILABLE_ERROR) skip = -1; else |