Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is largely just
taking the clang-recommended fixes and checking them in. Subsequent
patches will fix the more unique issues.
Note, that a number of new ignores are added into the .clang-tidy file.
These can be cleaned up over time as they're understood. The majority
are places where boost includes a impl/x.hpp and x.hpp, but expects you
to use the later. include-cleaner opts for the impl, but it isn't clear
why.
Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/include/credential_pipe.hpp b/include/credential_pipe.hpp
index 5e9153e..ec159e6 100644
--- a/include/credential_pipe.hpp
+++ b/include/credential_pipe.hpp
@@ -12,7 +12,9 @@
#include <boost/asio/write.hpp>
#include <array>
+#include <cstring>
#include <string>
+#include <utility>
// Wrapper for boost::async_pipe ensuring proper pipe cleanup
class CredentialsPipe
@@ -21,6 +23,9 @@
explicit CredentialsPipe(boost::asio::io_context& io) : impl(io), read(io)
{
boost::system::error_code ec;
+
+ // Unclear why tidy complains here.
+ // NOLINTNEXTLINE(misc-include-cleaner)
boost::asio::connect_pipe(read, impl, ec);
if (ec)
{
@@ -35,6 +40,7 @@
~CredentialsPipe()
{
+ // NOLINTNEXTLINE(misc-include-cleaner)
explicit_bzero(user.data(), user.capacity());
explicit_bzero(pass.data(), pass.capacity());
}