Skip to content
This repository was archived by the owner on Nov 29, 2024. It is now read-only.

Commit db27355

Browse files
committed
Some last compiler warnings resolved
1 parent 85d7c3d commit db27355

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

EAPMethods/src/Main.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ DWORD WINAPI EapPeerGetInfo(_In_ EAP_TYPE* pEapType, _Out_ EAP_PEER_METHOD_ROUTI
131131
}
132132

133133

134+
#pragma warning(push)
135+
#pragma warning(disable: 4702) // Compiler is smart enough to find out the initialize() method is empty => never throws an exception.
136+
134137
///
135138
/// Initializes an EAP peer method for EAPHost.
136139
///
@@ -162,6 +165,11 @@ DWORD APIENTRY EapPeerInitialize(_Out_ EAP_ERROR **ppEapError)
162165
return dwResult;
163166
}
164167

168+
#pragma warning(pop)
169+
170+
171+
#pragma warning(push)
172+
#pragma warning(disable: 4702) // Compiler is smart enough to find out the shutdown() method is empty => never throws an exception.
165173

166174
///
167175
/// Shuts down the EAP method and prepares to unload its corresponding DLL.
@@ -194,6 +202,8 @@ DWORD APIENTRY EapPeerShutdown(_Out_ EAP_ERROR **ppEapError)
194202
return dwResult;
195203
}
196204

205+
#pragma warning(pop)
206+
197207

198208
///
199209
/// Returns the user data and user identity after being called by EAPHost.

lib/TLS/src/Method.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ void eap::method_tls::decrypt_message(_In_ tls_message_type_t type, _Inout_ sani
13261326
// Check padding. Do not throw until HMAC is calculated.
13271327
// [Canvel, B., "Password Interception in a SSL/TLS Channel"](http://lasecwww.epfl.ch/memo_ssl.shtml)
13281328
unsigned char padding = data.back();
1329-
size_data = padding + 1 <= size_data ? size_data - (padding + 1) : 0;
1329+
size_data = (size_t)padding + 1 <= size_data ? size_data - (padding + 1) : 0;
13301330
for (size_t i = size_data, i_end = data.size() - 1; i < i_end; i++)
13311331
if (data[i] != padding)
13321332
padding_ok = false;

0 commit comments

Comments
 (0)