Use specific misc-include-cleaner statement
There are a few places that which clang-tidy seems reporting
false-positives and which can be suppressed either via using
`modernize-deprecated-headers` or more targeted inline
`misc-include-cleaner` statement.
Tested: Compiles
Change-Id: Ib609adbe8619f4b9a84e08388eea1e7cee58aa54
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
diff --git a/include/pam_authenticate.hpp b/include/pam_authenticate.hpp
index 358c9d8..06202a3 100644
--- a/include/pam_authenticate.hpp
+++ b/include/pam_authenticate.hpp
@@ -7,12 +7,8 @@
#include <security/_pam_types.h>
#include <security/pam_appl.h>
-// misc-include-cleaner complains if this isn't included,
-// modernize-deprecated-headers complains if it is included.
-// NOLINTNEXTLINE(modernize-deprecated-headers)
-#include <string.h>
-
#include <algorithm>
+#include <cstddef>
#include <cstring>
#include <memory>
#include <optional>
@@ -59,6 +55,7 @@
{
return PAM_CONV_ERR;
}
+ // NOLINTNEXTLINE(misc-include-cleaner)
response.resp = strdup(iter->value.c_str());
return PAM_SUCCESS;
}