build: fix multiple GCC warnings
These occur when Spot is compiled with --enable-optimizations and --disable-assert. * spot/mc/unionfind.cc, spot/twaalgos/mealy_machine.cc, spot/twaalgos/aiger.cc: Work around warnings about variables that are only used in assert. * spot/misc/common.hh [NDEBUG] (SPOT_ASSUME): Do not define as assert() when it is disabled. * spot/twaalgos/alternation.cc: Use insert instead of emplace to work around a spurious possible nullptr dereference. * spot/twaalgos/ltl2taa.cc, spot/twaalgos/ndfs_result.hxx, spot/twaalgos/tau03.cc, spot/twaalgos/tau03opt.cc: Work around spurious possible nullptr dereference. * spot/twaalgos/sbacc.cc: Work around spurious "maybe uninitialized" warning.
This commit is contained in:
parent
c973fcdf2d
commit
4710577dfe
10 changed files with 55 additions and 32 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2011, 2013, 2014, 2015, 2016, 2018 Laboratoire de recherche
|
||||
// Copyright (C) 2011, 2013-2016, 2018, 2021 Laboratoire de recherche
|
||||
// et développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2004, 2005, 2006 Laboratoire d'Informatique de Paris
|
||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
|
|
@ -462,7 +462,7 @@ namespace spot
|
|||
state_ptr_equal> m_source_trans;
|
||||
|
||||
template<bool cycle>
|
||||
class min_path: public bfs_steps
|
||||
class min_path final: public bfs_steps
|
||||
{
|
||||
public:
|
||||
min_path(ars_statistics* ars,
|
||||
|
|
@ -486,10 +486,8 @@ namespace spot
|
|||
const state* search(const state* start, twa_run::steps& l)
|
||||
{
|
||||
const state* s = filter(start);
|
||||
if (s)
|
||||
return this->bfs_steps::search(s, l);
|
||||
else
|
||||
return nullptr;
|
||||
SPOT_ASSERT(s);
|
||||
return this->bfs_steps::search(s, l);
|
||||
}
|
||||
|
||||
const state* filter(const state* s) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue