X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fopt%2Ftest%2Frun-correct-reporting.c;h=2dc62656ff7c9fc7253d85c2081dafd8bf86946f;hp=44f68ae2034b01d7146e6ac50a80f72346dbfbb2;hb=0191b7a74144ea8193961235f45715e715d4d8eb;hpb=b4cf10d83d46b50468ae52fccaeb99a793505467 diff --git a/ccan/opt/test/run-correct-reporting.c b/ccan/opt/test/run-correct-reporting.c index 44f68ae2..2dc62656 100644 --- a/ccan/opt/test/run-correct-reporting.c +++ b/ccan/opt/test/run-correct-reporting.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "utils.h" int main(int argc, char *argv[]) @@ -11,7 +12,7 @@ int main(int argc, char *argv[]) plan_tests(12); /* --aaa without args. */ - opt_register_arg("-a/--aaa", test_arg, NULL, "aaa", NULL); + opt_register_arg("-a/--aaa", test_arg, NULL, "aaa", ""); ok1(!parse_args(&argc, &argv, "--aaa", NULL)); ok1(strstr(err_output, ": --aaa: option requires an argument")); free(err_output); @@ -22,7 +23,7 @@ int main(int argc, char *argv[]) err_output = NULL; /* Multiple */ - opt_register_arg("--bbb/-b/-c/--ccc", test_arg, NULL, "aaa", NULL); + opt_register_arg("--bbb/-b/-c/--ccc", test_arg, NULL, "aaa", ""); ok1(!parse_args(&argc, &argv, "--bbb", NULL)); ok1(strstr(err_output, ": --bbb: option requires an argument")); free(err_output);