Prepare for clang-tidy-14
clang-tidy 14 now detects some more stuff that it couldn't before.
These are all pretty reasonable and things that we enforce today.
All changes were made by the robot.
Tested: Code compiles and unit tests pass.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I880d714c97adc38a190472766fb922fbfb30e82a
diff --git a/include/kvm_websocket.hpp b/include/kvm_websocket.hpp
index 51246aa..d45d414 100644
--- a/include/kvm_websocket.hpp
+++ b/include/kvm_websocket.hpp
@@ -17,7 +17,7 @@
{
public:
explicit KvmSession(crow::websocket::Connection& connIn) :
- conn(connIn), hostSocket(conn.getIoContext()), doingWrite(false)
+ conn(connIn), hostSocket(conn.getIoContext())
{
boost::asio::ip::tcp::endpoint endpoint(
boost::asio::ip::make_address("127.0.0.1"), 5900);
@@ -147,7 +147,7 @@
boost::asio::ip::tcp::socket hostSocket;
boost::beast::flat_static_buffer<1024UL * 50UL> outputBuffer;
boost::beast::flat_static_buffer<1024UL> inputBuffer;
- bool doingWrite;
+ bool doingWrite{false};
};
static boost::container::flat_map<crow::websocket::Connection*,
diff --git a/include/vm_websocket.hpp b/include/vm_websocket.hpp
index 6b7d9e7..5adf303 100644
--- a/include/vm_websocket.hpp
+++ b/include/vm_websocket.hpp
@@ -25,7 +25,7 @@
{
public:
Handler(const std::string& mediaIn, boost::asio::io_context& ios) :
- pipeOut(ios), pipeIn(ios), media(mediaIn), doingWrite(false),
+ pipeOut(ios), pipeIn(ios), media(mediaIn),
outputBuffer(new boost::beast::flat_static_buffer<nbdBufferSize>),
inputBuffer(new boost::beast::flat_static_buffer<nbdBufferSize>)
{}
@@ -150,7 +150,7 @@
boost::process::async_pipe pipeIn;
boost::process::child proxy;
std::string media;
- bool doingWrite;
+ bool doingWrite{false};
std::unique_ptr<boost::beast::flat_static_buffer<nbdBufferSize>>
outputBuffer;