From ec852171e606f9879b3ed50cc14777a240ad0791 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 27 Jul 2025 12:12:39 -0700 Subject: [PATCH] [Support] Remove an unnecessary cast (NFC) NumRead is already of ssize_t. --- llvm/lib/Support/Unix/Path.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index 277247e3cc236..cc02cae40ec76 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -1190,7 +1190,7 @@ Expected readNativeFile(file_t FD, MutableArrayRef Buf) { size_t Size = Buf.size(); #endif ssize_t NumRead = sys::RetryAfterSignal(-1, ::read, FD, Buf.data(), Size); - if (ssize_t(NumRead) == -1) + if (NumRead == -1) return errorCodeToError(errnoAsErrorCode()); // The underlying operation on these platforms allow opening directories // for reading in more cases than other platforms.