Skip to content

Commit 834ba23

Browse files
committed
Fix uninitialized variable
Error manifests when using GCC 15.1 with the following flags '-Wall Werror=uninitialized -fhardened'
1 parent 03f0ff3 commit 834ba23

File tree

1 file changed

+1
-1
lines changed
  • include/boost/beast/websocket/detail

1 file changed

+1
-1
lines changed

include/boost/beast/websocket/detail/frame.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ read_close(
213213
return;
214214
}
215215

216-
std::uint16_t code_be;
216+
std::uint16_t code_be = {};
217217
cr.reason.resize(n - 2);
218218
std::array<net::mutable_buffer, 2> out_bufs{{
219219
net::mutable_buffer(&code_be, sizeof(code_be)),

0 commit comments

Comments
 (0)