From a7d4ba5e7f0b4f01217f81673d44ec4ff48d0262 Mon Sep 17 00:00:00 2001 From: "Christian W. Zuckschwerdt" Date: Sat, 13 Nov 2021 22:40:49 +0100 Subject: [PATCH] minor: Fix fallthrough attribute for other compilers --- src/optparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/optparse.c b/src/optparse.c index a92cb1fe..aa3d0b53 100644 --- a/src/optparse.c +++ b/src/optparse.c @@ -231,8 +231,10 @@ int atoi_time(char const *str, char const *error_hint) break; } // intentional fallthrough -#if (defined(__GNUC__) || defined(__clang__)) && __has_attribute(fallthrough) +#if defined(__GNUC__) || defined(__clang__) +#if __has_attribute(fallthrough) __attribute__((fallthrough)); +#endif #endif case ':': ++colons;