Address code analysis warnings

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2019-08-22 20:44:38 +02:00
parent a459823beb
commit 6fb5cb88d2
60 changed files with 935 additions and 960 deletions

View File

@@ -65,7 +65,7 @@ namespace eap
///
/// \param[in] other Configuration to move from
///
config_method_eaphost(_Inout_ config_method_eaphost &&other);
config_method_eaphost(_Inout_ config_method_eaphost &&other) noexcept;
///
/// Copies configuration
@@ -83,7 +83,7 @@ namespace eap
///
/// \returns Reference to this object
///
config_method_eaphost& operator=(_Inout_ config_method_eaphost &&other);
config_method_eaphost& operator=(_Inout_ config_method_eaphost &&other) noexcept;
virtual config* clone() const;

View File

@@ -67,7 +67,7 @@ namespace eap
///
/// \param[in] other Credentials to move from
///
credentials_eaphost(_Inout_ credentials_eaphost &&other);
credentials_eaphost(_Inout_ credentials_eaphost &&other) noexcept;
///
/// Copies credentials
@@ -85,7 +85,7 @@ namespace eap
///
/// \returns Reference to this object
///
credentials_eaphost& operator=(_Inout_ credentials_eaphost &&other);
credentials_eaphost& operator=(_Inout_ credentials_eaphost &&other) noexcept;
virtual config* clone() const;
virtual void clear();
@@ -136,7 +136,7 @@ namespace eap
///
virtual source_t combine(
_In_ DWORD dwFlags,
_In_ HANDLE hTokenImpersonateUser,
_In_opt_ HANDLE hTokenImpersonateUser,
_In_opt_ const credentials *cred_cached,
_In_ const config_method &cfg,
_In_opt_z_ LPCTSTR pszTargetName);

View File

@@ -61,7 +61,7 @@ namespace eap
///
/// \param[in] other EAP method to move from
///
method_eaphost(_Inout_ method_eaphost &&other);
method_eaphost(_Inout_ method_eaphost &&other) noexcept;
///
/// Moves an EAP method
@@ -70,7 +70,7 @@ namespace eap
///
/// \returns Reference to this object
///
method_eaphost& operator=(_Inout_ method_eaphost &&other);
method_eaphost& operator=(_Inout_ method_eaphost &&other) noexcept;
/// \name Session management
/// @{
@@ -99,8 +99,8 @@ namespace eap
/// @}
virtual void get_result(
_In_ EapPeerMethodResultReason reason,
_Out_ EapPeerMethodResult *pResult);
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *pResult);
/// \name User Interaction
/// @{

View File

@@ -45,7 +45,7 @@ eap::config_method_eaphost::config_method_eaphost(_In_ const config_method_eapho
}
eap::config_method_eaphost::config_method_eaphost(_Inout_ config_method_eaphost &&other) :
eap::config_method_eaphost::config_method_eaphost(_Inout_ config_method_eaphost &&other) noexcept :
m_type (std::move(other.m_type )),
m_type_str (std::move(other.m_type_str)),
m_cfg_blob (std::move(other.m_cfg_blob)),
@@ -67,7 +67,7 @@ eap::config_method_eaphost& eap::config_method_eaphost::operator=(_In_ const con
}
eap::config_method_eaphost& eap::config_method_eaphost::operator=(_Inout_ config_method_eaphost &&other)
eap::config_method_eaphost& eap::config_method_eaphost::operator=(_Inout_ config_method_eaphost &&other) noexcept
{
if (this != &other) {
(config_method&&)*this = std::move(other );

View File

@@ -42,7 +42,7 @@ eap::credentials_eaphost::credentials_eaphost(_In_ const credentials_eaphost &ot
}
eap::credentials_eaphost::credentials_eaphost(_Inout_ credentials_eaphost &&other) :
eap::credentials_eaphost::credentials_eaphost(_Inout_ credentials_eaphost &&other) noexcept :
m_cred_blob(std::move(other.m_cred_blob)),
credentials(std::move(other ))
{
@@ -60,7 +60,7 @@ eap::credentials_eaphost& eap::credentials_eaphost::operator=(_In_ const credent
}
eap::credentials_eaphost& eap::credentials_eaphost::operator=(_Inout_ credentials_eaphost &&other)
eap::credentials_eaphost& eap::credentials_eaphost::operator=(_Inout_ credentials_eaphost &&other) noexcept
{
if (this != &other) {
(credentials&)*this = std::move(other);
@@ -220,7 +220,7 @@ LPCTSTR eap::credentials_eaphost::target_suffix() const
eap::credentials::source_t eap::credentials_eaphost::combine(
_In_ DWORD dwFlags,
_In_ HANDLE hTokenImpersonateUser,
_In_opt_ HANDLE hTokenImpersonateUser,
_In_opt_ const credentials *cred_cached,
_In_ const config_method &cfg,
_In_opt_z_ LPCTSTR pszTargetName)

View File

@@ -37,7 +37,7 @@ eap::method_eaphost::method_eaphost(_In_ module &mod, _In_ config_method_eaphost
}
eap::method_eaphost::method_eaphost(_Inout_ method_eaphost &&other) :
eap::method_eaphost::method_eaphost(_Inout_ method_eaphost &&other) noexcept :
m_cfg ( other.m_cfg ),
m_cred ( other.m_cred ),
m_session_id(std::move(other.m_session_id)),
@@ -46,7 +46,7 @@ eap::method_eaphost::method_eaphost(_Inout_ method_eaphost &&other) :
}
eap::method_eaphost& eap::method_eaphost::operator=(_Inout_ method_eaphost &&other)
eap::method_eaphost& eap::method_eaphost::operator=(_Inout_ method_eaphost &&other) noexcept
{
if (this != std::addressof(other)) {
assert(std::addressof(m_cfg ) == std::addressof(other.m_cfg )); // Move method within same configuration only!
@@ -257,7 +257,7 @@ EapPeerMethodResponseAction eap::method_eaphost::set_ui_context(
}
void eap::method_eaphost::get_response_attributes(_Inout_ EapAttributes *pAttribs)
void eap::method_eaphost::get_response_attributes(_Out_ EapAttributes *pAttribs)
{
// Get response attributes from EapHost peer.
eap_error_runtime error;