Unverified 提交 b578d422 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Avoid C++ unused goto symbol warning when liburing is not supported (#1250)

上级 ab46e362
......@@ -265,17 +265,18 @@ void TcpConnectionHandle::Write(
return;
}
#endif
write_libuv:
#endif
// First try uv_try_write(). In case it can not directly write all the given
// data then build a uv_req_t and use uv_write().
const size_t totalLen = len1 + len2;
uv_buf_t buffers[2];
int written{ 0 };
int err;
// First try uv_try_write(). In case it can not directly write all the given
// data then build a uv_req_t and use uv_write().
buffers[0] = uv_buf_init(reinterpret_cast<char*>(const_cast<uint8_t*>(data1)), len1);
buffers[1] = uv_buf_init(reinterpret_cast<char*>(const_cast<uint8_t*>(data2)), len2);
written = uv_try_write(reinterpret_cast<uv_stream_t*>(this->uvHandle), buffers, 2);
......
......@@ -190,9 +190,10 @@ void UdpSocketHandle::Send(
return;
}
#endif
send_libuv:
#endif
// First try uv_udp_try_send(). In case it can not directly send the datagram
// then build a uv_req_t and use uv_udp_send().
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论