Browse Source

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>
v6
Ben Noordhuis 8 years ago
committed by Anna Henningsen
parent
commit
a2441476cc
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 7
      test/cctest/test_inspector_socket.cc

7
test/cctest/test_inspector_socket.cc

@ -121,8 +121,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);
}
@ -360,7 +361,7 @@ class InspectorSocketTest : public ::testing::Test {
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;

Loading…
Cancel
Save