[PATCH] libctf: check for problems with error returns

Andreas Schwab schwab@suse.de
Tue Jan 30 14:27:34 GMT 2024


On Jan 30 2024, Nick Alcock wrote:

> diff --git a/libctf/testsuite/libctf-writable/libctf-errors.c b/libctf/testsuite/libctf-writable/libctf-errors.c
> index 71f8268cfad..2790b608396 100644
> --- a/libctf/testsuite/libctf-writable/libctf-errors.c
> +++ b/libctf/testsuite/libctf-writable/libctf-errors.c
> @@ -12,7 +12,7 @@ main (int argc, char *argv[])
>    ctf_dict_t *fp;
>    ctf_next_t *i = NULL;
>    size_t boom = 0;
> -  ctf_id_t itype, stype;
> +  ctf_id_t itype = 0, stype = 0;
>    ctf_encoding_t encoding = {0};
>    ctf_membinfo_t mi;
>    ssize_t ret;

This silences the warnings and all dependent tests pass.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


More information about the Binutils mailing list