work around some gcc 9.4 warnings

* spot/twa/twagraph.cc, spot/twaalgos/split.cc: Here.
This commit is contained in:
Alexandre Duret-Lutz 2023-11-28 17:50:28 +01:00
parent 738d62e0b9
commit 234ba2bb84
2 changed files with 7 additions and 2 deletions

View file

@ -368,11 +368,12 @@ namespace spot
unsigned n_edges = e_vec.size();
if (n_edges <= 1)
{
if (n_states == 1)
if (n_states <= 1)
return 0;
// We don't have a very convenient way to resize the state
// vector.
std::vector<unsigned> remap(n_states, -1U);
SPOT_ASSUME(remap.data() != nullptr); // help GCC 9.4
remap[0] = 0;
get_graph().defrag_states(remap, 1);
SPOT_ASSERT(num_states() == 1);

View file

@ -232,7 +232,11 @@ namespace spot
// number of a BDD that as been (or will be) split, and begin/end
// denotes a range of existing transition numbers that cover the
// split.
typedef std::pair<unsigned, unsigned> cached_t;
//
// std::pair causes some noexcept warnings when used in
// robin_hood::unordered_map with GCC 9.4. Use robin_hood::pair
// instead.
typedef robin_hood::pair<unsigned, unsigned> cached_t;
robin_hood::unordered_map<unsigned, cached_t> split_cond;
bdd all = aut->ap_vars();