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
|
|
@ -51,43 +51,43 @@ static const char * argp_program_doc =
|
|||
"List formulas that are similar to but simpler than a given formula.";
|
||||
|
||||
static const argp_option options[] = {
|
||||
{0, 0, 0, 0, "Mutation rules (all enabled unless those options are used):",
|
||||
15},
|
||||
{"ap-to-const", OPT_AP2CONST, 0, 0,
|
||||
{nullptr, 0, nullptr, 0,
|
||||
"Mutation rules (all enabled unless those options are used):", 15},
|
||||
{"ap-to-const", OPT_AP2CONST, nullptr, 0,
|
||||
"atomic propositions are replaced with true/false", 15},
|
||||
{"remove-one-ap", OPT_REMOVE_ONE_AP, 0, 0,
|
||||
{"remove-one-ap", OPT_REMOVE_ONE_AP, nullptr, 0,
|
||||
"all occurrences of an atomic proposition are replaced with another " \
|
||||
"atomic proposition used in the formula", 15},
|
||||
{"remove-multop-operands", OPT_REMOVE_MULTOP_OPERANDS, 0, 0,
|
||||
{"remove-multop-operands", OPT_REMOVE_MULTOP_OPERANDS, nullptr, 0,
|
||||
"remove one operand from multops", 15},
|
||||
{"remove-ops", OPT_REMOVE_OPS, 0, 0,
|
||||
{"remove-ops", OPT_REMOVE_OPS, nullptr, 0,
|
||||
"replace unary/binary operators with one of their operands",
|
||||
15},
|
||||
{"split-ops", OPT_SPLIT_OPS, 0, 0,
|
||||
{"split-ops", OPT_SPLIT_OPS, nullptr, 0,
|
||||
"when an operator can be expressed as a conjunction/disjunction using " \
|
||||
"simpler operators, each term of the conjunction/disjunction is a " \
|
||||
"mutation. e.g. a <-> b can be written as ((a & b) | (!a & !b)) or as " \
|
||||
"((a -> b) & (b -> a)) so those four terms can be a mutation of a <-> b", 0},
|
||||
{"rewrite-ops", OPT_REWRITE_OPS, 0, 0,
|
||||
{"rewrite-ops", OPT_REWRITE_OPS, nullptr, 0,
|
||||
"rewrite operators that have a semantically simpler form: a U b becomes " \
|
||||
"a W b, etc.", 0},
|
||||
{"simplify-bounds", OPT_SIMPLIFY_BOUNDS, 0, 0,
|
||||
{"simplify-bounds", OPT_SIMPLIFY_BOUNDS, nullptr, 0,
|
||||
"on a bounded unary operator, decrement one of the bounds, or set min to " \
|
||||
"0 or max to unbounded", 15},
|
||||
{0, 0, 0, 0, "Output options:", 20},
|
||||
{nullptr, 0, nullptr, 0, "Output options:", 20},
|
||||
{"max-count", 'n', "NUM", 0, "maximum number of mutations to output", 20},
|
||||
{"mutations", 'm', "NUM", 0, "number of mutations to apply to the " \
|
||||
"formulae (default: 1)", 0},
|
||||
{"sort", OPT_SORT, 0, 0, "sort the result by formula size", 0},
|
||||
{0, 0, 0, 0, "Miscellaneous options:", -1},
|
||||
{0, 0, 0, 0, 0, 0}
|
||||
{"sort", OPT_SORT, nullptr, 0, "sort the result by formula size", 0},
|
||||
{nullptr, 0, nullptr, 0, "Miscellaneous options:", -1},
|
||||
{nullptr, 0, nullptr, 0, nullptr, 0}
|
||||
};
|
||||
|
||||
static const argp_child children[] = {
|
||||
{&finput_argp, 0, 0, 10},
|
||||
{&output_argp, 0, 0, 20},
|
||||
{&misc_argp, 0, 0, -1},
|
||||
{0, 0, 0, 0}
|
||||
{&finput_argp, 0, nullptr, 10},
|
||||
{&output_argp, 0, nullptr, 20},
|
||||
{&misc_argp, 0, nullptr, -1},
|
||||
{nullptr, 0, nullptr, 0}
|
||||
};
|
||||
|
||||
namespace
|
||||
|
|
@ -96,7 +96,7 @@ namespace
|
|||
{
|
||||
public:
|
||||
int
|
||||
process_formula(spot::ltl::formula f, const char *filename = 0,
|
||||
process_formula(spot::ltl::formula f, const char* filename = nullptr,
|
||||
int linenum = 0)
|
||||
{
|
||||
auto mutations =
|
||||
|
|
@ -161,9 +161,10 @@ main(int argc, char* argv[])
|
|||
{
|
||||
setup(argv);
|
||||
|
||||
const argp ap = { options, parse_opt, 0, argp_program_doc, children, 0, 0 };
|
||||
const argp ap = { options, parse_opt, nullptr, argp_program_doc, children,
|
||||
nullptr, nullptr };
|
||||
|
||||
if (int err = argp_parse(&ap, argc, argv, ARGP_NO_HELP, 0, 0))
|
||||
if (int err = argp_parse(&ap, argc, argv, ARGP_NO_HELP, nullptr, nullptr))
|
||||
exit(err);
|
||||
|
||||
mut_opts |= opt_all;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue