From aa7b43eadfac4246a1224b15b01faf7ee1dd8ef3 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 16 Jan 2013 08:52:27 +0100 Subject: [PATCH] Fix several warnings reported by clang++ 3.2. * src/tgba/tgbakvcomplement.cc (tgba_kv_complement_succ_iterator::current_state_), src/ta/taexplicit.hh (state_ta_explicit::source_): Remove useless private member. * src/ta/taexplicit.cc: Adjust constructors. * src/ta/tgta.cc, src/ta/taexplicit.hh: Also fix copyright banner. * src/bin/ltlcross.cc (exec_with_timeout): Work around warning about status not being set in the error path. --- src/bin/ltlcross.cc | 6 ++++-- src/ta/taexplicit.cc | 8 +++----- src/ta/taexplicit.hh | 10 +++++----- src/ta/tgta.cc | 9 ++++----- src/tgba/tgbakvcomplement.cc | 6 +++--- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/bin/ltlcross.cc b/src/bin/ltlcross.cc index df3f0013e..e5b1d9953 100644 --- a/src/bin/ltlcross.cc +++ b/src/bin/ltlcross.cc @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2012 Laboratoire de Recherche et Développement de -// l'Epita (LRDE). +// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement +// de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -393,6 +393,8 @@ exec_with_timeout(const char* cmd) setpgid(0, 0); execlp("sh", "sh", "-c", cmd, (char*)0); error(2, errno, "failed to run 'sh'"); + // never reached + return -1; } else { diff --git a/src/ta/taexplicit.cc b/src/ta/taexplicit.cc index 37c39655b..40086f1b1 100644 --- a/src/ta/taexplicit.cc +++ b/src/ta/taexplicit.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et +// Copyright (C) 2010, 2011, 2012, 2013 Laboratoire de Recherche et // Développement de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -43,15 +43,13 @@ namespace spot // ta_explicit_succ_iterator ta_explicit_succ_iterator::ta_explicit_succ_iterator( - const state_ta_explicit* s) : - source_(s) + const state_ta_explicit* s) { transitions_ = s->get_transitions(); } ta_explicit_succ_iterator::ta_explicit_succ_iterator( - const state_ta_explicit* s, bdd condition) : - source_(s) + const state_ta_explicit* s, bdd condition) { transitions_ = s->get_transitions(condition); } diff --git a/src/ta/taexplicit.hh b/src/ta/taexplicit.hh index b0cf96e4f..a6516b987 100644 --- a/src/ta/taexplicit.hh +++ b/src/ta/taexplicit.hh @@ -1,5 +1,6 @@ -// Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et -// Developpement de l Epita_explicit (LRDE). +// -*- coding: utf-8 -*- +// Copyright (C) 2010, 2011, 2012, 2013 Laboratoire de Recherche et +// Développement de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -9,9 +10,9 @@ // (at your option) any later version. // // Spot is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANta_explicitBILITY +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -// License for more deta_explicitils. +// License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . @@ -265,7 +266,6 @@ namespace spot private: state_ta_explicit::transitions* transitions_; state_ta_explicit::transitions::const_iterator i_; - const state_ta_explicit* source_; }; } diff --git a/src/ta/tgta.cc b/src/ta/tgta.cc index 1a2edee8e..f12211e05 100644 --- a/src/ta/tgta.cc +++ b/src/ta/tgta.cc @@ -1,5 +1,6 @@ -// Copyright (C) 2012 Laboratoire de Recherche et Developpement -// de l Epita_explicit (LRDE). +// -*- coding: utf-8 -*- +// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement +// de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -9,7 +10,7 @@ // (at your option) any later version. // // Spot is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANta_explicitBILITY +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public // License for more deta_explicitils. // @@ -29,5 +30,3 @@ namespace spot } - - diff --git a/src/tgba/tgbakvcomplement.cc b/src/tgba/tgbakvcomplement.cc index 16cc6c147..808437ba2 100644 --- a/src/tgba/tgbakvcomplement.cc +++ b/src/tgba/tgbakvcomplement.cc @@ -1,5 +1,6 @@ -// Copyright (C) 2009, 2010, 2011 Laboratoire de Recherche et Développement -// de l'Epita (LRDE). +// -*- coding: utf-8 -*- +// Copyright (C) 2009, 2010, 2011, 2013 Laboratoire de Recherche et +// Développement de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -278,7 +279,6 @@ namespace spot bdd the_acceptance_cond_; const acc_list_t& acc_list_; const state_kv_complement* origin_; - const state_kv_complement* current_state_; bdd_list_t condition_list_; bdd_list_t::const_iterator current_condition_; state_rank_map highest_current_ranks_;