nullptr cleanup for -Wzero-as-null-pointer-constant
Fixes #106. * m4/gccwarn.m4: Use -Wzero-as-null-pointer-constant if supported. * src/bin/autfilt.cc, src/bin/common_aoutput.cc, src/bin/common_finput.cc, src/bin/common_finput.hh, src/bin/common_output.cc, src/bin/common_output.hh, src/bin/common_post.cc, src/bin/common_r.hh, src/bin/common_range.hh, src/bin/common_setup.cc, src/bin/common_trans.cc, src/bin/dstar2tgba.cc, src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc, src/bin/ltlfilt.cc, src/bin/ltlgrind.cc, src/bin/randaut.cc, src/bin/randltl.cc, src/bin/spot-x.cc, src/kripke/kripkeexplicit.cc, src/ltlast/formula.cc, src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh, src/ltlvisit/relabel.cc, src/ltlvisit/relabel.hh, src/ltlvisit/simplify.cc, src/ltlvisit/snf.hh, src/misc/fixpool.hh, src/misc/mspool.hh, src/misc/hash.hh, src/misc/optionmap.cc, src/misc/satsolver.cc, src/misc/tmpfile.cc, src/misc/tmpfile.hh, src/priv/bddalloc.cc, src/ta/ta.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/ta/taproduct.cc, src/ta/tgtaexplicit.hh, src/ta/tgtaproduct.cc, src/taalgos/minimize.cc, src/taalgos/reachiter.cc, src/taalgos/tgba2ta.cc, src/tests/complementation.cc, src/tests/ikwiad.cc, src/tests/randtgba.cc, src/tests/reduc.cc, src/twa/bdddict.cc, src/twa/bddprint.cc, src/twa/taatgba.cc, src/twa/twa.cc, src/twa/twagraph.hh, src/twa/twaproduct.cc, src/twa/twasafracomplement.cc, src/twaalgos/bfssteps.cc, src/twaalgos/compsusp.cc, src/twaalgos/dtgbasat.cc, src/twaalgos/emptiness.cc, src/twaalgos/gtec/ce.cc, src/twaalgos/gv04.cc, src/twaalgos/ltl2taa.cc, src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/ltl2tgba_fm.hh, src/twaalgos/magic.cc, src/twaalgos/minimize.cc, src/twaalgos/ndfs_result.hxx, src/twaalgos/postproc.cc, src/twaalgos/postproc.hh, src/twaalgos/reachiter.cc, src/twaalgos/reducerun.cc, src/twaalgos/safety.hh, src/twaalgos/sccfilter.hh, src/twaalgos/se05.cc, src/twaalgos/simulation.cc, src/twaalgos/tau03.cc, src/twaalgos/tau03opt.cc, src/twaalgos/translate.cc, src/twaalgos/translate.hh, utf8/utf8/core.h, bench/stutter/stutter_invariance_formulas.cc, iface/ltsmin/ltsmin.cc, iface/ltsmin/modelcheck.cc: Use nullptr to fix the warning.
This commit is contained in:
parent
51a3cfcede
commit
1729a79ac7
87 changed files with 755 additions and 717 deletions
|
|
@ -49,7 +49,7 @@ void usage(const char* prog)
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char *file = 0;
|
||||
char *file = nullptr;
|
||||
bool print_safra = false;
|
||||
bool print_automaton = false;
|
||||
//bool check = false;
|
||||
|
|
@ -110,7 +110,7 @@ int main(int argc, char* argv[])
|
|||
file = argv[i];
|
||||
}
|
||||
|
||||
if (file == 0)
|
||||
if (!file)
|
||||
{
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
|
|
@ -126,7 +126,7 @@ int main(int argc, char* argv[])
|
|||
return 2;
|
||||
spot::twa_graph_ptr a = h->aut;
|
||||
|
||||
spot::twa_ptr complement = 0;
|
||||
spot::twa_ptr complement = nullptr;
|
||||
|
||||
complement = spot::make_safra_complement(a);
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ int main(int argc, char* argv[])
|
|||
return 2;
|
||||
|
||||
auto a = spot::ltl_to_tgba_fm(f1, dict);
|
||||
spot::twa_ptr complement = 0;
|
||||
spot::twa_ptr complement = nullptr;
|
||||
complement = spot::make_safra_complement(a);
|
||||
|
||||
spot::print_dot(std::cout, complement);
|
||||
|
|
|
|||
|
|
@ -332,8 +332,8 @@ checked_main(int argc, char** argv)
|
|||
bool degen_cache = true;
|
||||
int output = 0;
|
||||
int formula_index = 0;
|
||||
const char* echeck_algo = 0;
|
||||
spot::emptiness_check_instantiator_ptr echeck_inst = 0;
|
||||
const char* echeck_algo = nullptr;
|
||||
spot::emptiness_check_instantiator_ptr echeck_inst = nullptr;
|
||||
enum { NoneDup, BFS, DFS } dupexp = NoneDup;
|
||||
bool expect_counter_example = false;
|
||||
bool accepting_run = false;
|
||||
|
|
@ -364,8 +364,8 @@ checked_main(int argc, char** argv)
|
|||
const char* opt_never = nullptr;
|
||||
const char* hoa_opt = nullptr;
|
||||
auto& env = spot::ltl::default_environment::instance();
|
||||
spot::ltl::atomic_prop_set* unobservables = 0;
|
||||
spot::twa_ptr system_aut = 0;
|
||||
spot::ltl::atomic_prop_set* unobservables = nullptr;
|
||||
spot::twa_ptr system_aut = nullptr;
|
||||
auto dict = spot::make_bdd_dict();
|
||||
spot::timer_map tm;
|
||||
bool use_timer = false;
|
||||
|
|
@ -797,7 +797,7 @@ checked_main(int argc, char** argv)
|
|||
while (tok)
|
||||
{
|
||||
unobservables->insert(env.require(tok));
|
||||
tok = strtok(0, ", \t;");
|
||||
tok = strtok(nullptr, ", \t;");
|
||||
}
|
||||
}
|
||||
else if (!strncmp(argv[formula_index], "-u", 2))
|
||||
|
|
@ -944,7 +944,7 @@ checked_main(int argc, char** argv)
|
|||
|
||||
if (f || from_file)
|
||||
{
|
||||
spot::twa_ptr a = 0;
|
||||
spot::twa_ptr a = nullptr;
|
||||
bool assume_sba = false;
|
||||
|
||||
if (from_file)
|
||||
|
|
@ -964,7 +964,7 @@ checked_main(int argc, char** argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
spot::ltl::ltl_simplifier* simp = 0;
|
||||
spot::ltl::ltl_simplifier* simp = nullptr;
|
||||
if (simpltl)
|
||||
simp = new spot::ltl::ltl_simplifier(redopt, dict);
|
||||
|
||||
|
|
@ -1004,7 +1004,7 @@ checked_main(int argc, char** argv)
|
|||
post_branching,
|
||||
fair_loop_approx,
|
||||
unobservables,
|
||||
fm_red ? simp : 0,
|
||||
fm_red ? simp : nullptr,
|
||||
fm_unambiguous);
|
||||
break;
|
||||
case TransCompo:
|
||||
|
|
@ -1061,8 +1061,7 @@ checked_main(int argc, char** argv)
|
|||
{
|
||||
auto aa = ensure_digraph(a);
|
||||
tm.start("obligation minimization");
|
||||
auto minimized = minimize_obligation(aa,
|
||||
f, 0, reject_bigger);
|
||||
auto minimized = minimize_obligation(aa, f, nullptr, reject_bigger);
|
||||
tm.stop("obligation minimization");
|
||||
|
||||
if (!minimized)
|
||||
|
|
@ -1318,7 +1317,7 @@ checked_main(int argc, char** argv)
|
|||
}
|
||||
tm.stop("producing output");
|
||||
}
|
||||
a = 0;
|
||||
a = nullptr;
|
||||
output = -1;
|
||||
}
|
||||
if (tgta_opt)
|
||||
|
|
@ -1457,8 +1456,9 @@ checked_main(int argc, char** argv)
|
|||
{
|
||||
std::cout << "this is not an obligation property";
|
||||
auto tmp = tba_determinize_check(ensure_digraph(a),
|
||||
0, opt_o_threshold, f, 0);
|
||||
if (tmp != 0 && tmp != a)
|
||||
0, opt_o_threshold,
|
||||
f, nullptr);
|
||||
if (tmp && tmp != a)
|
||||
std::cout << ", but it is a recurrence property";
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ const char* default_algos[] = {
|
|||
"Tau03_opt(condstack)",
|
||||
"Tau03_opt(condstack ordering)",
|
||||
"Tau03_opt(condstack ordering !weights)",
|
||||
0
|
||||
nullptr
|
||||
};
|
||||
|
||||
std::vector<ec_algo> ec_algos;
|
||||
|
|
@ -520,7 +520,7 @@ generate_formula(const spot::ltl::random_ltl& rl,
|
|||
assert(opt_l);
|
||||
std::cerr << "Failed to generate non-reducible formula "
|
||||
<< "of size " << opt_l << " or more." << std::endl;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
std::string txt = spot::ltl::str_psl(f);
|
||||
if (!opt_u || unique.insert(txt).second)
|
||||
|
|
@ -529,7 +529,7 @@ generate_formula(const spot::ltl::random_ltl& rl,
|
|||
assert(opt_u);
|
||||
std::cerr << "Failed to generate another unique formula."
|
||||
<< std::endl;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -539,9 +539,9 @@ main(int argc, char** argv)
|
|||
bool opt_dp = false;
|
||||
int opt_f = 15;
|
||||
int opt_F = 0;
|
||||
char* opt_p = 0;
|
||||
char* opt_i = 0;
|
||||
std::istream *formula_file = 0;
|
||||
char* opt_p = nullptr;
|
||||
char* opt_i = nullptr;
|
||||
std::istream *formula_file = nullptr;
|
||||
int opt_l = 0;
|
||||
bool opt_u = false;
|
||||
int opt_S = 0;
|
||||
|
|
@ -633,7 +633,7 @@ main(int argc, char** argv)
|
|||
break;
|
||||
else if (input == "")
|
||||
break;
|
||||
ec_algo a = { input, 0 };
|
||||
ec_algo a = { input, nullptr };
|
||||
ec_algos.push_back(a);
|
||||
}
|
||||
|
||||
|
|
@ -815,7 +815,7 @@ main(int argc, char** argv)
|
|||
const char** i = default_algos;
|
||||
while (*i)
|
||||
{
|
||||
ec_algo a = { *(i++), 0 };
|
||||
ec_algo a = { *(i++), nullptr };
|
||||
ec_algos.push_back(a);
|
||||
}
|
||||
}
|
||||
|
|
@ -834,7 +834,7 @@ main(int argc, char** argv)
|
|||
ec_algos[i].inst =
|
||||
spot::make_emptiness_check_instantiator(ec_algos[i].name.c_str(),
|
||||
&err);
|
||||
if (ec_algos[i].inst == 0)
|
||||
if (!ec_algos[i].inst)
|
||||
{
|
||||
std::cerr << "Parse error after `" << err << '\'' << std::endl;
|
||||
exit(1);
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ main(int argc, char** argv)
|
|||
spot::ltl::formula f1 = nullptr;
|
||||
spot::ltl::formula f2 = nullptr;
|
||||
|
||||
std::ifstream* fin = 0;
|
||||
std::ifstream* fin = nullptr;
|
||||
|
||||
if (readfile)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue