From 76df9349292831970961d50493115a1ed7d22451 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 26 Jun 2023 14:47:28 +0900 Subject: [PATCH] tests:gpgscm: Add annotation for unreachable code for GCC. * tests/gpgscm/scheme.c [__GNUC__] (type_to_string): Use __builtin_unreachable for GCC. -- Signed-off-by: NIIBE Yutaka --- tests/gpgscm/scheme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c index bde39fcd0..003e85037 100644 --- a/tests/gpgscm/scheme.c +++ b/tests/gpgscm/scheme.c @@ -169,7 +169,11 @@ type_to_string (enum scheme_types typ) case T_SINK: return "sink"; case T_FRAME: return "frame"; } +#ifdef __GNUC__ + __builtin_unreachable (); +#else assert (! "not reached"); +#endif } /* ADJ is enough slack to align cells in a TYPE_BITS-bit boundary */