From 6b49e6a14fa2e00de1fc0bbe60bd304299be516d Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 13 Nov 2025 11:01:38 -0600 Subject: [libc][NFC] Fix warnings in RPC server code --- libc/shared/rpc_opcodes.h | 6 +++--- libc/src/__support/RPC/rpc_server.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libc') diff --git a/libc/shared/rpc_opcodes.h b/libc/shared/rpc_opcodes.h index 583d622e1fa0..a9c4f5521021 100644 --- a/libc/shared/rpc_opcodes.h +++ b/libc/shared/rpc_opcodes.h @@ -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; diff --git a/libc/src/__support/RPC/rpc_server.h b/libc/src/__support/RPC/rpc_server.h index 4c8242acafd2..abd604ae4814 100644 --- a/libc/src/__support/RPC/rpc_server.h +++ b/libc/src/__support/RPC/rpc_server.h @@ -298,7 +298,7 @@ LIBC_INLINE static void handle_printf(rpc::Server::Port &port, results[lane] = static_cast( 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; } -- cgit v1.2.3