Commit 279bfa00 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

fix some implicit promotion from bool, as suggested by PVS-Studio

For #192.

* spot/parseaut/parseaut.yy, spot/parseaut/scanaut.ll,
spot/tl/randomltl.cc, spot/twa/acc.cc, spot/twaalgos/postproc.hh: Here.
parent 630e90b9
......@@ -2067,9 +2067,9 @@ static void fix_initial_state(result_& r)
// Multiple initial states. We might need to add a fake one,
// unless one of the actual initial state has no incoming edge.
auto& aut = r.h->aut;
std::vector<unsigned> has_incoming(aut->num_states(), 0);
std::vector<unsigned char> has_incoming(aut->num_states(), 0);
for (auto& t: aut->edges())
has_incoming[t.dst] = true;
has_incoming[t.dst] = 1;
bool found = false;
unsigned init = 0;
......
......@@ -425,7 +425,7 @@ namespace spot
YY_NEW_FILE;
hoayyreset();
if (want_interactive)
yy_set_interactive(true);
yy_set_interactive(1);
return 0;
}
......@@ -461,7 +461,7 @@ namespace spot
YY_NEW_FILE;
hoayyreset();
if (want_interactive)
yy_set_interactive(true);
yy_set_interactive(1);
return 0;
}
......
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2015 Laboratoire
// de Recherche et Développement de l'Epita (LRDE).
// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2016
// Laboratoire de Recherche et Développement de l'Epita (LRDE).
// Copyright (C) 2005 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
// Pierre et Marie Curie.
......@@ -412,9 +412,9 @@ namespace spot
opt_seed_ = opts.get("seed", 0);
opt_tree_size_min_ = opts.get("tree_size_min", 15);
opt_tree_size_max_ = opts.get("tree_size_max", 15);
opt_unique_ = opts.get("unique", true);
opt_wf_ = opts.get("wf", false);
opt_simpl_level_ = opts.get("simplification_level", 3);
opt_unique_ = opts.get("unique", 1);
opt_wf_ = opts.get("wf", 0);
const char* tok_pL = nullptr;
const char* tok_pS = nullptr;
......
......@@ -299,7 +299,7 @@ namespace spot
SPOT_UNREACHABLE();
}
SPOT_UNREACHABLE();
return false;
return 0U;
}
}
......@@ -532,7 +532,7 @@ namespace spot
if (max)
res = odd ? t() : f();
else
res = (sets & 1) == odd ? t() : f();
res = ((sets & 1) == odd) ? t() : f();
if (sets == 0)
return res;
......
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2012, 2013, 2014, 2015, 2016 Laboratoire de Recherche
// et Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
......@@ -178,7 +178,7 @@ namespace spot
// Fine-tuning options fetched from the option_map.
bool degen_reset_ = true;
bool degen_order_ = false;
int degen_cache_ = true;
int degen_cache_ = 1;
bool degen_lskip_ = true;
bool degen_lowinit_ = false;
bool det_scc_ = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment