We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-Wmaybe-uninitialized
1 parent b208018 commit 7a65315Copy full SHA for 7a65315
src/util/wpipe.cpp
@@ -64,7 +64,7 @@ void WakeupPipe::Drain() const
64
assert(m_valid && m_pipe[0] != -1);
65
66
int ret{0};
67
- std::array<uint8_t, 128> buf;
+ std::array<uint8_t, 128> buf{};
68
do {
69
ret = read(m_pipe[0], buf.data(), buf.size());
70
} while (ret > 0);
@@ -78,7 +78,7 @@ void WakeupPipe::Write()
78
#ifdef USE_WAKEUP_PIPE
79
assert(m_valid && m_pipe[1] != -1);
80
81
- std::array<uint8_t, EXPECTED_PIPE_WRITTEN_BYTES> buf;
+ std::array<uint8_t, EXPECTED_PIPE_WRITTEN_BYTES> buf{};
82
int ret = write(m_pipe[1], buf.data(), buf.size());
83
if (ret == -1) {
84
LogPrintf("write() to m_pipe[1] = %d failed with error %s\n", m_pipe[1], NetworkErrorString(WSAGetLastError()));
0 commit comments