Skip to content

Commit

Permalink
src: remove unreachable UNREACHABLE
Browse files Browse the repository at this point in the history
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: #46281
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
tniessen authored Jan 22, 2023
1 parent 179b865 commit 8c308ab
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/string_bytes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,8 @@ MaybeLocal<Value> StringBytes::Encode(Isolate* isolate,
}

default:
CHECK(0 && "unknown encoding");
break;
UNREACHABLE("unknown encoding");
}

UNREACHABLE();
}


Expand Down

0 comments on commit 8c308ab

Please sign in to comment.