1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-06-26 14:47:28 +09:00
parent 1f9a4fbc7e
commit 76df934929
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -169,7 +169,11 @@ type_to_string (enum scheme_types typ)
case T_SINK: return "sink"; case T_SINK: return "sink";
case T_FRAME: return "frame"; case T_FRAME: return "frame";
} }
#ifdef __GNUC__
__builtin_unreachable ();
#else
assert (! "not reached"); assert (! "not reached");
#endif
} }
/* ADJ is enough slack to align cells in a TYPE_BITS-bit boundary */ /* ADJ is enough slack to align cells in a TYPE_BITS-bit boundary */