summaryrefslogtreecommitdiff
path: root/tests/test-tsearch.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2017-05-18 08:36:27 -0700
committerJim Meyering <meyering@fb.com>2017-05-19 16:47:09 -0700
commit11fdf80b21f2b40a10687b9a3d16c852b19d512c (patch)
tree06b2c31b901f30ba9e802ab6487290e84a60c4f2 /tests/test-tsearch.c
parent06094e390b058f1318e7885b13c3b5c2aaa42927 (diff)
downloadgnulib-11fdf80b21f2b40a10687b9a3d16c852b19d512c.tar.gz
fallthrough: update for GCC 7/8
* lib/quotearg.c (FALLTHROUGH): New macro. Use it whenever one switch case falls through into the next, replacing "/* Fall through */" comments. This exposed one instance of an unwarranted "fall through" comment: unwarranted because it preceded a "goto" label not a case statement. * lib/freopen-safer.c (freopen_safer): Likewise. * lib/fts.c (leaf_optimization_applies): Likewise. * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise. * tests/test-getopt_long.h (getopt_long_loop): Likewise. * tests/test-tsearch.c (mangle_tree): Likewise. Also include tests/macros.h for the definition. * tests/test-argp.c (group1_parser): Likewise. * tests/test-getopt.h (getopt_loop): Likewise.
Diffstat (limited to 'tests/test-tsearch.c')
-rw-r--r--tests/test-tsearch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-tsearch.c b/tests/test-tsearch.c
index 5cbf38de8b..9e77524f23 100644
--- a/tests/test-tsearch.c
+++ b/tests/test-tsearch.c
@@ -34,6 +34,8 @@ SIGNATURE_CHECK (twalk, void, (void const *,
#include <stdlib.h>
#include <string.h>
+#include "macros.h"
+
#define SEED 0
#if HAVE_TSEARCH
/* The system's tsearch() is not expected to keep the tree balanced. */
@@ -234,7 +236,7 @@ mangle_tree (enum order how, enum action what, void **root, int lag)
break;
j = k;
- /* fall through */
+ FALLTHROUGH;
case delete:
elem = tfind (x + j, (void *const *) root, cmp_fn);