mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: check result of uv_loop_init and uv_write
Silence coverity warnings about the return value not being checked. PR-URL: https://github.com/nodejs/node/pull/10126 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@chromium.org> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
c2d7e67458
commit
a696934faa
1 file changed
+4
-3
@@ -112,8 +112,9 @@ static void do_write(const char* data, int len) {
|
||||
uv_buf_t buf[1];
|
||||
buf[0].base = const_cast<char*>(data);
|
||||
buf[0].len = len;
|
||||
uv_write(&req, reinterpret_cast<uv_stream_t*>(&client_socket), buf, 1,
|
||||
write_done);
|
||||
GTEST_ASSERT_EQ(0,
|
||||
uv_write(&req, reinterpret_cast<uv_stream_t*>(&client_socket),
|
||||
buf, 1, write_done));
|
||||
SPIN_WHILE(req.data);
|
||||
}
|
||||
|
||||
@@ -351,7 +352,7 @@ protected:
|
||||
connected = false;
|
||||
inspector_ready = false;
|
||||
last_event = kInspectorHandshakeHttpGet;
|
||||
uv_loop_init(&loop);
|
||||
GTEST_ASSERT_EQ(0, uv_loop_init(&loop));
|
||||
server = uv_tcp_t();
|
||||
client_socket = uv_tcp_t();
|
||||
server.data = &inspector;
|
||||
|
||||
Reference in new issue
Block a user