public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3151] remove dead variables Date: Fri, 7 Oct 2022 08:11:58 +0000 (GMT) [thread overview] Message-ID: <20221007081158.3ABCC382F99D@sourceware.org> (raw) https://gcc.gnu.org/g:bd0e35188f2a40a428314ad10e10ab5b0926f935 commit r13-3151-gbd0e35188f2a40a428314ad10e10ab5b0926f935 Author: Martin Liska <mliska@suse.cz> Date: Fri Oct 7 10:10:30 2022 +0200 remove dead variables Remove unused variables that are modified but not used. gcc/ChangeLog: * auto-profile.cc (get_inline_stack): Remove unused variable. gcc/objc/ChangeLog: * objc-gnu-runtime-abi-01.cc (generate_static_references): Remove unused variable. Diff: --- gcc/auto-profile.cc | 2 -- gcc/objc/objc-gnu-runtime-abi-01.cc | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 6533722817f..ca48404eaf1 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -388,7 +388,6 @@ get_inline_stack (location_t locus, inline_stack *stack) tree block = LOCATION_BLOCK (locus); if (block && TREE_CODE (block) == BLOCK) { - int level = 0; for (block = BLOCK_SUPERCONTEXT (block); block && (TREE_CODE (block) == BLOCK); block = BLOCK_SUPERCONTEXT (block)) @@ -401,7 +400,6 @@ get_inline_stack (location_t locus, inline_stack *stack) stack->safe_push ( std::make_pair (decl, get_combined_location (locus, decl))); locus = tmp_locus; - level++; } } stack->safe_push ( diff --git a/gcc/objc/objc-gnu-runtime-abi-01.cc b/gcc/objc/objc-gnu-runtime-abi-01.cc index 94133146d8f..e76c486927e 100644 --- a/gcc/objc/objc-gnu-runtime-abi-01.cc +++ b/gcc/objc/objc-gnu-runtime-abi-01.cc @@ -1852,7 +1852,7 @@ generate_static_references (void) tree class_name, klass, decl; tree cl_chain, in_chain, type = build_array_type (build_pointer_type (void_type_node), NULL_TREE); - int num_inst, num_class; + int num_class; char buf[BUFSIZE]; vec<constructor_elt, va_gc> *decls = NULL; @@ -1861,8 +1861,8 @@ generate_static_references (void) { vec<constructor_elt, va_gc> *v = NULL; - for (num_inst = 0, in_chain = TREE_PURPOSE (cl_chain); - in_chain; num_inst++, in_chain = TREE_CHAIN (in_chain)); + for (in_chain = TREE_PURPOSE (cl_chain); + in_chain; in_chain = TREE_CHAIN (in_chain)); snprintf (buf, BUFSIZE, "_OBJC_STATIC_INSTANCES_%d", num_class); decl = start_var_decl (type, buf);
reply other threads:[~2022-10-07 8:11 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=20221007081158.3ABCC382F99D@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.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).