diff --git a/svr-kex.c b/svr-kex.c
index 96f4508f090d304ba0fd6473b790f0484fad9e47..f3828aa9d2ae919aa0660542dbe7046c47f5241a 100644
--- a/svr-kex.c
+++ b/svr-kex.c
@@ -138,7 +138,7 @@ static void svr_ensure_hostkey() {
 			break;
 #endif
 		default:
-			(void)0;
+			dropbear_assert(0);
 	}
 
 	if (readhostkey(fn, svr_opts.hostkey, &type) == DROPBEAR_SUCCESS) {