From 14da89f41a67fc6755ede3769b3f79632e5ec3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 22 Jan 2023 01:28:16 +0100 Subject: [PATCH] src: remove unreachable UNREACHABLE All paths leading up to this UNREACHABLE either return or abort. (If they did not, the compiler would at least emit a warning.) PR-URL: https://github.com/nodejs/node/pull/46281 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Darshan Sen --- src/string_bytes.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/string_bytes.cc b/src/string_bytes.cc index e1f2d92bf2e..0e6b8b84214 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -684,11 +684,8 @@ MaybeLocal StringBytes::Encode(Isolate* isolate, } default: - CHECK(0 && "unknown encoding"); - break; + UNREACHABLE("unknown encoding"); } - - UNREACHABLE(); }