public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Nick Alcock <nix@sourceware.org> To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] libctf: fix uninitialized variables in testsuite Date: Mon, 11 Mar 2024 17:18:00 +0000 (GMT) [thread overview] Message-ID: <20240311171800.334933858D20@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9b9e262994636841de04b433413e8987b16fcbaa commit 9b9e262994636841de04b433413e8987b16fcbaa Author: Nick Alcock <nick.alcock@oracle.com> Date: Tue Jan 30 14:18:54 2024 +0000 libctf: fix uninitialized variables in testsuite Just because a path is an error path doesn't mean the program terminates there if you don't ask it to. And we don't want to -- but that means we need to initialize the variables that are missed if an error happens to *something*. Type ID 0 (unimplemented) will do: it'll induce further ECTF_BADID errors, but that's no bad thing. libctf/ChangeLog: * testsuite/libctf-writable/libctf-errors.c: Initialize variables. Diff: --- libctf/testsuite/libctf-writable/libctf-errors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;
reply other threads:[~2024-03-11 17:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240311171800.334933858D20@sourceware.org \ --to=nix@sourceware.org \ --cc=bfd-cvs@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).