Skip to content

Commit 702c3ee

Browse files
committed
fix(websocket): resolve sign-conversion warnings in protocol
- use std::size_t for buffer indexing instead of int - eliminate implicit signed/unsigned conversions - ensure compatibility with -Wsign-conversion and strict builds improves type safety and keeps websocket module warning-free
2 parents fd6ce42 + aeb59e3 commit 702c3ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/vix/websocket/protocol.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ namespace vix::websocket
321321
std::array<unsigned char, 20> out{};
322322
const std::uint32_t hs[5] = {h0, h1, h2, h3, h4};
323323

324-
for (int i = 0; i < 5; ++i)
324+
for (std::size_t i = 0; i < 5; ++i)
325325
{
326326
out[i * 4 + 0] = static_cast<unsigned char>((hs[i] >> 24) & 0xFFu);
327327
out[i * 4 + 1] = static_cast<unsigned char>((hs[i] >> 16) & 0xFFu);

0 commit comments

Comments
 (0)