diff mbox

Remove dead code.

Message ID 20150504115021.GA29913@linux.vnet.ibm.com
State New
Headers show

Commit Message

Dominik Vogt May 4, 2015, 11:50 a.m. UTC
This patch removes a "write only" variable from the C++ code.

ChangeLog:

--

2015-05-04  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	* call.c (print_z_candidates): Remove dead code.

--

Ciao

Dominik ^_^  ^_^

Comments

Jeff Law May 4, 2015, 5:13 p.m. UTC | #1
On 05/04/2015 05:50 AM, Dominik Vogt wrote:
> This patch removes a "write only" variable from the C++ code.
>
> ChangeLog:
>
> --
>
> 2015-05-04  Dominik Vogt  <vogt@linux.vnet.ibm.com>
>
> 	* call.c (print_z_candidates): Remove dead code.
OK.  Please install.

FWIW, removing a write-only variable seems like it ought ot fall under 
the obvious rule.

jeff
diff mbox

Patch

From 6943ad84a5a5b69c7cf5df1ea5bb6ab5fd254825 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <vogt@linux.vnet.ibm.com>
Date: Mon, 4 May 2015 12:46:21 +0100
Subject: [PATCH] Remove dead code.

---
 gcc/cp/call.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 31d2b9c..55350f8 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3436,7 +3436,6 @@  print_z_candidates (location_t loc, struct z_candidate *candidates)
 {
   struct z_candidate *cand1;
   struct z_candidate **cand2;
-  int n_candidates;
 
   if (!candidates)
     return;
@@ -3478,9 +3477,6 @@  print_z_candidates (location_t loc, struct z_candidate *candidates)
 	}
     }
 
-  for (n_candidates = 0, cand1 = candidates; cand1; cand1 = cand1->next)
-    n_candidates++;
-
   for (; candidates; candidates = candidates->next)
     print_z_candidate (loc, "candidate:", candidates);
 }
-- 
2.3.0