summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr4dish <ovitnez@gmail.com>2023-04-04 02:17:34 +0300
committerr4dish <ovitnez@gmail.com>2023-04-04 02:17:34 +0300
commita24ab2cd92bbeddb9c1780cdaae6d60745144f8c (patch)
treedc82fd39f29c3a3b5e77727f2b946722a577427f
parentc9ebca67ba33cc2e132cc19e51d52ec2d275fac1 (diff)
Fix a few warnings reported by MSVC compiler
-rw-r--r--src/net/BoostHttpOnlySslClient.cpp2
-rw-r--r--src/tools/StringTools.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/net/BoostHttpOnlySslClient.cpp b/src/net/BoostHttpOnlySslClient.cpp
index 82bd897..30279e6 100644
--- a/src/net/BoostHttpOnlySslClient.cpp
+++ b/src/net/BoostHttpOnlySslClient.cpp
@@ -59,7 +59,7 @@ string BoostHttpOnlySslClient::makeRequest(const Url& url, const vector<HttpReqA
// We'll need to get the underlying native socket for this select call, in order
// to add a simple timeout on the read:
- int nativeSocket = socket.lowest_layer().native_handle();
+ int nativeSocket = static_cast<int>(socket.lowest_layer().native_handle());
FD_SET(nativeSocket,&fileDescriptorSet);
select(nativeSocket+1,&fileDescriptorSet,NULL,NULL,&timeStruct);
diff --git a/src/tools/StringTools.cpp b/src/tools/StringTools.cpp
index 3e5e6c4..cc5436f 100644
--- a/src/tools/StringTools.cpp
+++ b/src/tools/StringTools.cpp
@@ -63,7 +63,7 @@ string generateRandomString(std::size_t length) {
random_device randomDevice;
mt19937 randomSeed(randomDevice());
- uniform_int_distribution<int> generator(0, charsLen - 1);
+ uniform_int_distribution<std::size_t> generator(0, charsLen - 1);
for (std::size_t i = 0; i < length; ++i) {
result += chars[generator(randomSeed)];