Fix warnings with GCC 7 on Centos 7
* spot/twa/twagraph.cc: Mark two variables as unused. * spot/twaalgos/aiger.cc: Avoid spurious nullptr dereference warning, and mark more variable as unused. * spot/twaalgos/forq_contains.cc (word::operator==): Mark as maybe_unused. * bin/ltlsynt.cc, spot/twaalgos/relabel.cc, spot/twaalgos/mealy_machine.cc, spot/twaalgos/synthesis.cc, spot/twaalgos/zlktree.cc: Avoid unused variables warnings. * spot/twaalgos/toparity.cc: Remove uses of std::optional, they were not necessary, and they trigger spurious warnings in GCC 7. Also work around a spurious "potential nullptr deref". * tests/core/twacube.cc: Fix another potential nullptr warning. * spot/twaalgos/simulation.cc: Work a around GCC 6/7 bug.
This commit is contained in:
parent
1a2746e182
commit
75f3a5f2c5
11 changed files with 115 additions and 107 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2015, 2016, 2018, 2020 Laboratoire de Recherche et
|
||||
// Copyright (C) 2015, 2016, 2018, 2020, 2023 Laboratoire de Recherche et
|
||||
// Développement de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -78,7 +78,10 @@ int main()
|
|||
|
||||
const std::vector<std::string>& aps = aut->ap();
|
||||
unsigned int seed = 17;
|
||||
for (auto it = aut->succ(2); !it->done(); it->next())
|
||||
auto it = aut->succ(2);
|
||||
SPOT_ASSUME(it); // GCC 7 warns about potential nullptr.
|
||||
for (; !it->done(); it->next())
|
||||
for (; !it->done(); it->next())
|
||||
{
|
||||
auto& t = aut->trans_storage(it, seed);
|
||||
auto& d = aut->trans_data(it, seed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue