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
1 changed files with 4 additions and 0 deletions

View File

@ -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 */