Work around spurious g++-12 warnings

* spot/twaalgos/ltl2tgba_fm.cc, spot/tl/formula.hh,
spot/twaalgos/translate.cc: Add SPOT_ASSUME in various places to help
g++.
This commit is contained in:
Alexandre Duret-Lutz 2022-12-08 17:27:32 +01:00
parent 720c380412
commit 1248d326aa
3 changed files with 19 additions and 9 deletions

View file

@ -1026,11 +1026,16 @@ namespace spot
bool coacc = false;
auto& st = sm->states_of(n);
for (auto l: st)
if (namer->get_name(l).accepts_eword())
{
coacc = true;
break;
}
{
formula lf = namer->get_name(l);
// Somehow gcc 12.2.0 thinks lf can be nullptr.
SPOT_ASSUME(lf != nullptr);
if (lf.accepts_eword())
{
coacc = true;
break;
}
}
if (!coacc)
{
// ... or if any of its successors is coaccessible.