[libc][NFC] Fix warnings in RPC server code

This commit is contained in:
Joseph Huber 2025-11-13 11:01:38 -06:00
parent de3d74aa5d
commit 6b49e6a14f
2 changed files with 4 additions and 4 deletions

View File

@ -47,9 +47,9 @@ typedef enum {
LIBC_SYSTEM = LLVM_LIBC_OPCODE(29),
// Internal opcodes for testing.
LIBC_TEST_INCREMENT = LLVM_LIBC_OPCODE(1 << 15),
LIBC_TEST_INTERFACE = LLVM_LIBC_OPCODE((1 << 15) + 1),
LIBC_TEST_STREAM = LLVM_LIBC_OPCODE((1 << 15) + 2),
LIBC_TEST_INCREMENT = LLVM_LIBC_OPCODE((1 << 15)),
LIBC_TEST_INTERFACE = LLVM_LIBC_OPCODE(((1 << 15) + 1)),
LIBC_TEST_STREAM = LLVM_LIBC_OPCODE(((1 << 15) + 2)),
LIBC_LAST = 0xFFFFFFFF,
} rpc_opcode_t;

View File

@ -298,7 +298,7 @@ LIBC_INLINE static void handle_printf(rpc::Server::Port &port,
results[lane] = static_cast<int>(
fwrite(buffer, 1, writer.get_chars_written(), files[lane]));
if (results[lane] != writer.get_chars_written() || ret == -1)
if (size_t(results[lane]) != writer.get_chars_written() || ret == -1)
results[lane] = -1;
}