From 389ef16b1b6111202a2bfcc9671528a6d70ecd47 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 10 Aug 2018 16:22:57 +0200 Subject: [PATCH] gcc-snapshot warnings * spot/kripke/kripkegraph.hh, spot/priv/bddalloc.hh, spot/priv/freelist.hh, spot/priv/satcommon.hh, spot/ta/taexplicit.cc spot/twa/bdddict.cc, spot/twa/twagraph.hh, spot/twaalgos/alternation.hh, spot/twaalgos/dtwasat.cc, spot/twaalgos/ltl2taa.cc, spot/twaalgos/stutter.cc, tests/core/ngraph.cc: Add default constructors, copy constructors, or remove useless destructors. --- spot/kripke/kripkegraph.hh | 13 ++++++++++++- spot/priv/bddalloc.hh | 15 ++++++++++++++- spot/priv/freelist.hh | 19 +++++++++++++++++-- spot/priv/satcommon.hh | 4 ---- spot/ta/taexplicit.cc | 5 ++++- spot/twa/bdddict.cc | 13 +++++++++++++ spot/twa/twagraph.hh | 9 +++++++++ spot/twaalgos/alternation.hh | 8 ++++++-- spot/twaalgos/dtwasat.cc | 5 ----- spot/twaalgos/ltl2taa.cc | 4 ---- spot/twaalgos/stutter.cc | 2 +- tests/core/ngraph.cc | 13 +++++++++++++ 12 files changed, 89 insertions(+), 21 deletions(-) diff --git a/spot/kripke/kripkegraph.hh b/spot/kripke/kripkegraph.hh index 57297b024..bfd83426b 100644 --- a/spot/kripke/kripkegraph.hh +++ b/spot/kripke/kripkegraph.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2011-2017 Laboratoire de Recherche et Développement de +// Copyright (C) 2011-2018 Laboratoire de Recherche et Développement de // l'Epita (LRDE) // // This file is part of Spot, a model checking library. @@ -35,6 +35,17 @@ namespace spot { } + kripke_graph_state(const kripke_graph_state& other) noexcept + : cond_(other.cond_) + { + } + + kripke_graph_state& operator=(const kripke_graph_state& other) noexcept + { + cond_ = other.cond_; + return *this; + } + virtual ~kripke_graph_state() noexcept { } diff --git a/spot/priv/bddalloc.hh b/spot/priv/bddalloc.hh index 990ed3fa2..590c40d54 100644 --- a/spot/priv/bddalloc.hh +++ b/spot/priv/bddalloc.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2013, 2016 Laboratoire de Recherche et Développement +// Copyright (C) 2013, 2016, 2018 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre @@ -35,6 +35,19 @@ namespace spot public: /// Default constructor. bdd_allocator(); + + bdd_allocator(const bdd_allocator& other) + : free_list(other), lvarnum(other.lvarnum) + { + } + + bdd_allocator& operator=(const bdd_allocator& other) + { + free_list::operator=(other); + lvarnum = other.lvarnum; + return *this; + } + /// Initialize the BDD library. static void initialize(); /// Allocate \a n BDD variables. diff --git a/spot/priv/freelist.hh b/spot/priv/freelist.hh index 334c7201f..9dee2d28d 100644 --- a/spot/priv/freelist.hh +++ b/spot/priv/freelist.hh @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2008,2013 Laboratoire de Recherche et Développement -// de l'Epita (LRDE). +// Copyright (C) 2008,2013,2018 Laboratoire de Recherche et +// Développement de l'Epita (LRDE). // Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre // et Marie Curie. @@ -36,6 +36,21 @@ namespace spot public: virtual ~free_list(); + free_list() + { + } + + free_list(const free_list& other) + : fl(other.fl) + { + } + + free_list& operator=(const free_list& other) + { + fl = other.fl; + return *this; + } + /// \brief Find \a n consecutive integers. /// /// Browse the list of free integers until \a n consecutive diff --git a/spot/priv/satcommon.hh b/spot/priv/satcommon.hh index b07d2efe6..a8403bff7 100644 --- a/spot/priv/satcommon.hh +++ b/spot/priv/satcommon.hh @@ -106,10 +106,6 @@ public: #endif } - ~vars_helper() - { - } - /// \brief Save all different sizes and precompute some values. void init(unsigned size_src, unsigned size_cond, unsigned size_dst, diff --git a/spot/ta/taexplicit.cc b/spot/ta/taexplicit.cc index b552c1f42..3c8a42cf7 100644 --- a/spot/ta/taexplicit.cc +++ b/spot/ta/taexplicit.cc @@ -260,7 +260,10 @@ namespace spot state_ta_explicit* state_ta_explicit::clone() const { - return new state_ta_explicit(*this); + return new state_ta_explicit(tgba_state_, tgba_condition_, + is_initial_state_, + is_accepting_state_, + is_livelock_accepting_state_, transitions_); } void diff --git a/spot/twa/bdddict.cc b/spot/twa/bdddict.cc index 1d83e37d5..b74a808c3 100644 --- a/spot/twa/bdddict.cc +++ b/spot/twa/bdddict.cc @@ -55,6 +55,19 @@ namespace spot { } + anon_free_list(const anon_free_list& other) noexcept + : free_list(other), priv_(other.priv_) + { + } + + spot::bdd_dict_priv::anon_free_list& + operator=(const anon_free_list& other) noexcept + { + spot::free_list::operator=(other); + priv_ = other.priv_; + return *this; + } + virtual int extend(int n) override { diff --git a/spot/twa/twagraph.hh b/spot/twa/twagraph.hh index 14da195aa..215f9d522 100644 --- a/spot/twa/twagraph.hh +++ b/spot/twa/twagraph.hh @@ -42,6 +42,15 @@ namespace spot { } + twa_graph_state(const twa_graph_state&) noexcept + { + } + + twa_graph_state& operator=(const twa_graph_state&) noexcept + { + return *this; + } + virtual ~twa_graph_state() noexcept { } diff --git a/spot/twaalgos/alternation.hh b/spot/twaalgos/alternation.hh index c0adcf6ef..efc320dab 100644 --- a/spot/twaalgos/alternation.hh +++ b/spot/twaalgos/alternation.hh @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2016 Laboratoire de Recherche et Développement de -// l'Epita (LRDE). +// Copyright (C) 2016, 2018 Laboratoire de Recherche et Développement +// de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -114,6 +114,10 @@ namespace spot public: univ_remover_state(const std::set& states); + univ_remover_state(const univ_remover_state& other) + : states_(other.states_), is_reset_(other.is_reset_) + { + } int compare(const state* other) const override; size_t hash() const override; state* clone() const override; diff --git a/spot/twaalgos/dtwasat.cc b/spot/twaalgos/dtwasat.cc index 62cf5a821..cab21b276 100644 --- a/spot/twaalgos/dtwasat.cc +++ b/spot/twaalgos/dtwasat.cc @@ -233,11 +233,6 @@ namespace spot trimming_map ref_inf_trim_map; trimming_map cand_inf_trim_map; - ~dict() - { - aut->get_dict()->unregister_all_my_variables(this); - } - int transid(unsigned src, unsigned cond, unsigned dst) { diff --git a/spot/twaalgos/ltl2taa.cc b/spot/twaalgos/ltl2taa.cc index 346583df8..49c3880ee 100644 --- a/spot/twaalgos/ltl2taa.cc +++ b/spot/twaalgos/ltl2taa.cc @@ -41,10 +41,6 @@ namespace spot { } - ~ltl2taa_visitor() - { - } - taa_tgba_formula_ptr& result() { diff --git a/spot/twaalgos/stutter.cc b/spot/twaalgos/stutter.cc index 1aab344bd..6f4e20574 100644 --- a/spot/twaalgos/stutter.cc +++ b/spot/twaalgos/stutter.cc @@ -77,7 +77,7 @@ namespace spot virtual state_tgbasl* clone() const override { - return new state_tgbasl(*this); + return new state_tgbasl(s_, cond_); } const state* diff --git a/tests/core/ngraph.cc b/tests/core/ngraph.cc index 0c0db715e..021e66452 100644 --- a/tests/core/ngraph.cc +++ b/tests/core/ngraph.cc @@ -345,6 +345,19 @@ public: { } + my_state() noexcept + { + } + + my_state(const my_state&) noexcept + { + } + + my_state& operator=(const my_state&) noexcept + { + return *this; + } + int compare(const spot::state* other) const override { auto o = spot::down_cast(other);