From b99cfa88bbc3b92d6460bc030ce800360e10653c Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 17 Jan 2013 11:36:59 +0100 Subject: [PATCH] Fix two dead assignments detected by clang's static analyzer. * src/tgbaalgos/scc.cc, src/tgbatest/ltl2tgba.cc: Remove assignments to unread variables. --- src/tgbaalgos/scc.cc | 7 +++---- src/tgbatest/ltl2tgba.cc | 13 +++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/tgbaalgos/scc.cc b/src/tgbaalgos/scc.cc index efcd54552..5c4963f43 100644 --- a/src/tgbaalgos/scc.cc +++ b/src/tgbaalgos/scc.cc @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2008, 2009, 2011, 2012 Laboratoire de Recherche et -// Développement de l'Epita. +// Copyright (C) 2008, 2009, 2011, 2012, 2013 Laboratoire de Recherche +// et Développement de l'Epita. // // This file is part of Spot, a model checking library. // @@ -233,9 +233,8 @@ namespace spot continue; } - // If we know the state, reuse the previous object. + // We already know the state. dest->destroy(); - dest = spi->first; // Have we reached a maximal SCC? if (spi->second >= 0) diff --git a/src/tgbatest/ltl2tgba.cc b/src/tgbatest/ltl2tgba.cc index 0a5fbc005..d69c7960c 100644 --- a/src/tgbatest/ltl2tgba.cc +++ b/src/tgbatest/ltl2tgba.cc @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Laboratoire de Recherche et -// Développement de l'Epita (LRDE). +// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Laboratoire +// de Recherche et Développement de l'Epita (LRDE). // Copyright (C) 2003, 2004, 2005, 2006, 2007 Laboratoire d'Informatique de // Paris 6 (LIP6), département Systèmes Répartis // Coopératifs (SRC), Université Pierre et Marie Curie. @@ -1283,8 +1283,7 @@ main(int argc, char** argv) if (system) { - const spot::tgba* product = product_to_free = a = - new spot::tgba_product(system, a); + product_to_free = a = new spot::tgba_product(system, a); assume_sba = false; @@ -1296,14 +1295,12 @@ main(int argc, char** argv) degeneralize_opt = DegenTBA; if (degeneralize_opt == DegenTBA) { - product = product_degeneralized = a = - new spot::tgba_tba_proxy(product); + product_degeneralized = a = new spot::tgba_tba_proxy(a); } else if (degeneralize_opt == DegenSBA) { tm.start("degeneralize product"); - product = product_degeneralized = a = - spot::degeneralize(product); + product_degeneralized = a = spot::degeneralize(a); tm.stop("degeneralize product"); assume_sba = true; }