diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-05-04 21:22:02 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-05-07 10:06:08 (GMT) |
commit | 2faa3f6c55d2288316419f3efb8a483904a295f2 (patch) | |
tree | 8f4227f0e5299b5f6647e2e94cd7d52e55e643f5 /Source/cmConnection.cxx | |
parent | 75e87e3db402c80390fa05c6b36ffab27089a46b (diff) | |
download | CMake-2faa3f6c55d2288316419f3efb8a483904a295f2.zip CMake-2faa3f6c55d2288316419f3efb8a483904a295f2.tar.gz CMake-2faa3f6c55d2288316419f3efb8a483904a295f2.tar.bz2 |
Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
Diffstat (limited to 'Source/cmConnection.cxx')
-rw-r--r-- | Source/cmConnection.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmConnection.cxx b/Source/cmConnection.cxx index 884e314..e4d0cf1 100644 --- a/Source/cmConnection.cxx +++ b/Source/cmConnection.cxx @@ -5,7 +5,7 @@ #include <cassert> #include <cstring> -#include "cm_uv.h" +#include <cm3p/uv.h> #include "cmServer.h" @@ -20,8 +20,13 @@ void cmEventBasedConnection::on_alloc_buffer(uv_handle_t* handle, uv_buf_t* buf) { (void)(handle); +#ifndef __clang_analyzer__ char* rawBuffer = new char[suggested_size]; *buf = uv_buf_init(rawBuffer, static_cast<unsigned int>(suggested_size)); +#else + (void)(suggested_size); + (void)(buf); +#endif /* __clang_analyzer__ */ } void cmEventBasedConnection::on_read(uv_stream_t* stream, ssize_t nread, @@ -76,6 +81,7 @@ void cmEventBasedConnection::WriteData(const std::string& _data) assert(uv_thread_equal(&curr_thread_id, &this->Server->ServeThreadId)); #endif +#ifndef __clang_analyzer__ auto data = _data; assert(this->WriteStream.get()); if (BufferStrategy) { @@ -90,6 +96,9 @@ void cmEventBasedConnection::WriteData(const std::string& _data) memcpy(req->buf.base, data.c_str(), ds); uv_write(reinterpret_cast<uv_write_t*>(req), this->WriteStream, &req->buf, 1, on_write); +#else + (void)(_data); +#endif /* __clang_analyzer__ */ } void cmEventBasedConnection::ReadData(const std::string& data) |