work around some g++-7.3 issues

* spot/twaalgos/langmap.cc, spot/ltsmin/ltsmin.cc: Add asserts to hide
spurious "potential null pointer dereference" messages.
* spot/twaalgos/tau03opt.cc (color_ref): Initialize pc to nullptr
even when is_cyan is true so that valgrind does not report pc being
used uninitialized in is_white().
This commit is contained in:
Alexandre Duret-Lutz 2018-03-27 22:20:49 +02:00
parent 095d019940
commit fc205c1883
3 changed files with 6 additions and 1 deletions

View file

@ -45,6 +45,7 @@ namespace spot
for (unsigned i = 0; i < n_states; ++i)
{
twa_graph_ptr c = make_twa_graph(aut, twa::prop_set::all());
assert(c); // for some reason g++ 7.3 thinks this could be null
c->set_init_state(i);
alt_init_st_auts[i] = c;
compl_alt_init_st_auts[i] = remove_fin(dualize(c));

View file

@ -408,7 +408,7 @@ namespace spot
public:
color_ref(hash_type* h, hcyan_type* hc, const state* s,
const weight* w, acc_cond::mark_t* a)
: is_cyan(true), w(w), ph(h), phc(hc), ps(s), acc(a)
: is_cyan(true), w(w), ph(h), phc(hc), ps(s), pc(nullptr), acc(a)
{
}
color_ref(color* c, acc_cond::mark_t* a)