X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftest_tparm.c;h=1c976af7f88faa8787a86bd1017f3a9b4193dd25;hp=01fadfee714f4c5bc9943a5c13fff36792f8217e;hb=1ddfa997c0965852dbdc738aa6d92c0cd0975f3b;hpb=21b36e89c00f2188954d680bf9fea60328b4538c diff --git a/test/test_tparm.c b/test/test_tparm.c index 01fadfee..1c976af7 100644 --- a/test/test_tparm.c +++ b/test/test_tparm.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey * - * $Id: test_tparm.c,v 1.17 2021/03/06 23:39:14 tom Exp $ + * $Id: test_tparm.c,v 1.20 2021/03/20 15:58:32 tom Exp $ * * Exercise tparm, either for all possible capabilities with fixed parameters, * or one capability with all possible parameters. @@ -41,7 +41,7 @@ #define USE_TINFO #include -static void failed(const char *) GCC_NORETURN; +static GCC_NORETURN void failed(const char *); static void failed(const char *msg) @@ -393,7 +393,7 @@ main(int argc, char *argv[]) r_opt = 1; if (a_opt) { - for (n = 0; n < use_parms; ++n) + for (n = 0; n < max_parms; ++n) if (num_parms[n]) use_parms *= (num_parms[n] + 1); } @@ -429,9 +429,9 @@ main(int argc, char *argv[]) all_terms[t_run]); } + memset(all_parms, 0, sizeof(all_parms)); if (a_opt) { /* for each combination of values */ - memset(all_parms, 0, sizeof(all_parms)); do { for (n_run = 0; n_run < use_caps; ++n_run) { test_tparm(cap_name[n_run], cap_data[n_run], all_parms);