]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/test_tparm.c
ncurses 6.3 - patch 20220521
[ncurses.git] / test / test_tparm.c
index 01fadfee714f4c5bc9943a5c13fff36792f8217e..1c976af7f88faa8787a86bd1017f3a9b4193dd25 100644 (file)
@@ -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 <test.priv.h>
 
-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);