diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2021-01-28 15:00:11 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2021-02-04 16:01:53 +0000 |
commit | 5dacd11ddcf98c3893dfed1563feaf2a1a518389 (patch) | |
tree | 974322f71cbe6deaebe47be5f71eb145bb356f50 | |
parent | caa170493e884215af4d07ea891ed1e2eeeb0578 (diff) | |
download | gdb-5dacd11ddcf98c3893dfed1563feaf2a1a518389.zip gdb-5dacd11ddcf98c3893dfed1563feaf2a1a518389.tar.gz gdb-5dacd11ddcf98c3893dfed1563feaf2a1a518389.tar.bz2 |
libctf: fix uninitialized variable in symbol serialization error handling
We declare a variable to hold errors at two scopes, and then initialize
the inner one and jump to a scope where only the outer one is in scope.
The consequences are minor: only the version of the error message
printed in the debugging stream is impacted.
libctf/ChangeLog
2021-01-27 Nick Alcock <nick.alcock@oracle.com>
* ctf-create.c (ctf_serialize): Fix shadowing.
-rw-r--r-- | libctf/ChangeLog | 4 | ||||
-rw-r--r-- | libctf/ctf-create.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 10178bc..c700297 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,9 @@ 2021-01-27 Nick Alcock <nick.alcock@oracle.com> + * ctf-create.c (ctf_serialize): Fix shadowing. + +2021-01-27 Nick Alcock <nick.alcock@oracle.com> + * ctf-create.c (ctf_add_encoded): Add check for non-empty name. (ctf_add_forward): Likewise. (ctf_add_typedef): Likewise. diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index cf12557..c01ab7a 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -907,7 +907,6 @@ ctf_serialize (ctf_dict_t *fp) ctf_next_t *i = NULL; void *symname; const char **walk; - int err; if (filter_syms) { |