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

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

View File

@@ -62,7 +62,7 @@ namespace eap
///
/// \param[in] other MSCHAPv2 method to move from
///
method_mschapv2_base(_Inout_ method_mschapv2_base &&other);
method_mschapv2_base(_Inout_ method_mschapv2_base &&other) noexcept;
///
/// Moves a MSCHAPv2 method
@@ -71,7 +71,7 @@ namespace eap
///
/// \returns Reference to this object
///
method_mschapv2_base& operator=(_Inout_ method_mschapv2_base &&other);
method_mschapv2_base& operator=(_Inout_ method_mschapv2_base &&other) noexcept;
/// \name Session management
/// @{
@@ -94,8 +94,8 @@ namespace eap
/// @}
virtual void get_result(
_In_ EapPeerMethodResultReason reason,
_Out_ EapPeerMethodResult *pResult);
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *pResult);
protected:
///
@@ -162,7 +162,7 @@ namespace eap
///
/// \param[in] other MSCHAPv2 method to move from
///
method_mschapv2(_Inout_ method_mschapv2 &&other);
method_mschapv2(_Inout_ method_mschapv2 &&other) noexcept;
///
/// Moves a MSCHAPv2 method
@@ -171,7 +171,7 @@ namespace eap
///
/// \returns Reference to this object
///
method_mschapv2& operator=(_Inout_ method_mschapv2 &&other);
method_mschapv2& operator=(_Inout_ method_mschapv2 &&other) noexcept;
/// \name Packet processing
/// @{
@@ -208,7 +208,7 @@ namespace eap
///
/// \param[in] other MSCHAPv2 method to move from
///
method_mschapv2_diameter(_Inout_ method_mschapv2_diameter &&other);
method_mschapv2_diameter(_Inout_ method_mschapv2_diameter &&other) noexcept;
///
/// Moves a MSCHAPv2 method
@@ -217,7 +217,7 @@ namespace eap
///
/// \returns Reference to this object
///
method_mschapv2_diameter& operator=(_Inout_ method_mschapv2_diameter &&other);
method_mschapv2_diameter& operator=(_Inout_ method_mschapv2_diameter &&other) noexcept;
/// \name Session management
/// @{

View File

@@ -40,7 +40,7 @@ eap::config_method_mschapv2::config_method_mschapv2(_In_ const config_method_msc
}
eap::config_method_mschapv2::config_method_mschapv2(_Inout_ config_method_mschapv2 &&other) :
eap::config_method_mschapv2::config_method_mschapv2(_Inout_ config_method_mschapv2 &&other) noexcept :
config_method_with_cred(std::move(other))
{
}
@@ -55,7 +55,7 @@ eap::config_method_mschapv2& eap::config_method_mschapv2::operator=(_In_ const c
}
eap::config_method_mschapv2& eap::config_method_mschapv2::operator=(_Inout_ config_method_mschapv2 &&other)
eap::config_method_mschapv2& eap::config_method_mschapv2::operator=(_Inout_ config_method_mschapv2 &&other) noexcept
{
if (this != &other)
(config_method_with_cred&&)*this = std::move(other);
@@ -103,7 +103,7 @@ eap::config_method_eapmschapv2::config_method_eapmschapv2(_In_ const config_meth
}
eap::config_method_eapmschapv2::config_method_eapmschapv2(_Inout_ config_method_eapmschapv2 &&other) :
eap::config_method_eapmschapv2::config_method_eapmschapv2(_Inout_ config_method_eapmschapv2 &&other) noexcept :
config_method_mschapv2(std::move(other))
{
}
@@ -118,7 +118,7 @@ eap::config_method_eapmschapv2& eap::config_method_eapmschapv2::operator=(_In_ c
}
eap::config_method_eapmschapv2& eap::config_method_eapmschapv2::operator=(_Inout_ config_method_eapmschapv2 &&other)
eap::config_method_eapmschapv2& eap::config_method_eapmschapv2::operator=(_Inout_ config_method_eapmschapv2 &&other) noexcept
{
if (this != &other)
(config_method_mschapv2&&)*this = std::move(other);

View File

@@ -37,7 +37,7 @@ eap::method_mschapv2_base::method_mschapv2_base(_In_ module &mod, _In_ config_me
}
eap::method_mschapv2_base::method_mschapv2_base(_Inout_ method_mschapv2_base &&other) :
eap::method_mschapv2_base::method_mschapv2_base(_Inout_ method_mschapv2_base &&other) noexcept :
m_cfg ( other.m_cfg ),
m_cred ( other.m_cred ),
m_cp (std::move(other.m_cp )),
@@ -51,7 +51,7 @@ eap::method_mschapv2_base::method_mschapv2_base(_Inout_ method_mschapv2_base &&o
}
eap::method_mschapv2_base& eap::method_mschapv2_base::operator=(_Inout_ method_mschapv2_base &&other)
eap::method_mschapv2_base& eap::method_mschapv2_base::operator=(_Inout_ method_mschapv2_base &&other) noexcept
{
if (this != std::addressof(other)) {
assert(std::addressof(m_cfg ) == std::addressof(other.m_cfg )); // Move method within same configuration only!
@@ -93,7 +93,7 @@ void eap::method_mschapv2_base::get_response_packet(
_In_opt_ DWORD size_max)
{
if (m_packet_res.size() > size_max)
throw invalid_argument(string_printf(__FUNCTION__ " This method does not support packet fragmentation, but the data size is too big to fit in one packet (packet: %u, maximum: %u).", m_packet_res.size(), size_max));
throw invalid_argument(string_printf(__FUNCTION__ " This method does not support packet fragmentation, but the data size is too big to fit in one packet (packet: %zu, maximum: %u).", m_packet_res.size(), size_max));
packet.assign(m_packet_res.begin(), m_packet_res.end());
}
@@ -211,13 +211,13 @@ eap::method_mschapv2::method_mschapv2(_In_ module &mod, _In_ config_method_mscha
}
eap::method_mschapv2::method_mschapv2(_Inout_ method_mschapv2 &&other) :
eap::method_mschapv2::method_mschapv2(_Inout_ method_mschapv2 &&other) noexcept :
method_mschapv2_base(std::move(other ))
{
}
eap::method_mschapv2& eap::method_mschapv2::operator=(_Inout_ method_mschapv2 &&other)
eap::method_mschapv2& eap::method_mschapv2::operator=(_Inout_ method_mschapv2 &&other) noexcept
{
if (this != std::addressof(other))
(method_mschapv2_base&)*this = std::move(other);
@@ -328,14 +328,14 @@ eap::method_mschapv2_diameter::method_mschapv2_diameter(_In_ module &mod, _In_ c
}
eap::method_mschapv2_diameter::method_mschapv2_diameter(_Inout_ method_mschapv2_diameter &&other) :
eap::method_mschapv2_diameter::method_mschapv2_diameter(_Inout_ method_mschapv2_diameter &&other) noexcept :
m_phase (std::move(other.m_phase)),
method_mschapv2_base(std::move(other ))
{
}
eap::method_mschapv2_diameter& eap::method_mschapv2_diameter::operator=(_Inout_ method_mschapv2_diameter &&other)
eap::method_mschapv2_diameter& eap::method_mschapv2_diameter::operator=(_Inout_ method_mschapv2_diameter &&other) noexcept
{
if (this != std::addressof(other)) {
(method_mschapv2_base&)*this = std::move(other );