From c01d10f431843546af833f0927959207e262e7f2 Mon Sep 17 00:00:00 2001 From: cy384 Date: Sun, 27 Dec 2020 16:37:07 -0500 Subject: [PATCH] improve switch safety/fix compiler warning --- ssheven.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ssheven.c b/ssheven.c index 7d28998..5a203a9 100644 --- a/ssheven.c +++ b/ssheven.c @@ -852,7 +852,7 @@ pascal Boolean TwoItemFilter(DialogPtr dlog, EventRecord *event, short *itemHit) *itemHit = 6; return true; } - // fall through in case of a plain '.' !!!! + __attribute__ ((fallthrough)); // fall through in case of a plain '.' default: // TODO: this is dumb and assumes everything else is a valid text character selStart = (**((DialogPeek)dlog)->textH).selStart; // Get the selection in the visible item @@ -1274,6 +1274,10 @@ int known_hosts(void) printf_i("Host found in known hosts but key doesn't match!\r\n"); safe_to_connect = 0; break; + default: + printf_i("Unexpected error while checking known-hosts: %d\r\n", e); + safe_to_connect = 0; + break; } }