From 5dacd11ddcf98c3893dfed1563feaf2a1a518389 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Thu, 28 Jan 2021 15:00:11 +0000 Subject: [PATCH] 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 * ctf-create.c (ctf_serialize): Fix shadowing. --- libctf/ChangeLog | 4 ++++ libctf/ctf-create.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 10178bca86d..c700297abc6 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,7 @@ +2021-01-27 Nick Alcock + + * ctf-create.c (ctf_serialize): Fix shadowing. + 2021-01-27 Nick Alcock * ctf-create.c (ctf_add_encoded): Add check for non-empty name. diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index cf12557b5d5..c01ab7a10e2 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) { -- 2.30.2