aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-12-30 18:12:20 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-12-30 18:12:20 +0100
commitce696555f15ff7d583dc85836f81d18cf2c7558d (patch)
treeba6d84c45c1307efe5bc0620699a54219102f7c8
parent0b282796b76eb54406d44d1bd3f55c9c0ad624ce (diff)
Remove usage of [[fallthrough]]
-rw-r--r--cbs.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/cbs.h b/cbs.h
index d5f1a1f..5117f1d 100644
--- a/cbs.h
+++ b/cbs.h
@@ -80,19 +80,15 @@
# include <stdnoreturn.h>
#endif
-/* Give helpful diagnostics when people use die() incorrectly on GCC, and
- disable fallthrough warnings as they might popup for some people. C23
+/* Give helpful diagnostics when people use die() incorrectly on GCC. C23
introduced C++ attribute syntax, so we need a check for that too. */
#ifdef __GNUC__
# ifdef CBS_IS_C23
-# define ATTR_FF [[fallthrough]]
# define ATTR_FMT [[gnu::format(printf, 1, 2)]]
# else
-# define ATTR_FF __attribute__((fallthrough))
# define ATTR_FMT __attribute__((format(printf, 1, 2)))
# endif
#else
-# define ATTR_FF
# define ATTR_FMT
#endif
@@ -636,9 +632,7 @@ pcquery(cmd_t *cmd, char *lib, int flags)
switch (wordexp(p, &we, 0)) {
case WRDE_BADCHAR:
- ATTR_FF;
case WRDE_BADVAL:
- ATTR_FF;
case WRDE_SYNTAX:
errno = EINVAL;
die("wordexp");