From cc761870c23262997a8a102d1f738b18ca1b4011 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 4 Sep 2016 17:25:24 +0200 Subject: [PATCH] kripkegraph: fix g++ warning Test the output of down_cast before using it. This used to generate a warning when crosscompiling for mingw with g+++ 6.1.1 * spot/kripke/kripkegraph.hh: Here. --- spot/kripke/kripkegraph.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spot/kripke/kripkegraph.hh b/spot/kripke/kripkegraph.hh index 8dd037faf..27bc9eeb4 100644 --- a/spot/kripke/kripkegraph.hh +++ b/spot/kripke/kripkegraph.hh @@ -245,7 +245,9 @@ namespace spot /// \brief Get the condition on the state virtual bdd state_condition(const state* s) const override { - return down_cast(s)->cond(); + auto gs = down_cast(s); + SPOT_ASSERT(gs); + return gs->cond(); } edge_storage_t& edge_storage(unsigned t)