aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-06-26 05:47:28 +0000
committerNIIBE Yutaka <[email protected]>2023-06-26 05:47:28 +0000
commit76df9349292831970961d50493115a1ed7d22451 (patch)
treebef5ce5bb006a19c2af30de2cc632e4ec8c17c22 /tests
parentgpg,w32: Add comment about debug output of ShellExecuteEx. (diff)
downloadgnupg-76df9349292831970961d50493115a1ed7d22451.tar.gz
gnupg-76df9349292831970961d50493115a1ed7d22451.zip
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 <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/gpgscm/scheme.c4
1 files changed, 4 insertions, 0 deletions
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 */