From 239a391093be64ec588bb0c30f0af15ec75180ce Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 4 Sep 2018 15:46:46 +0200 Subject: [PATCH] Review implicit narrowing conversions --- lib/EAPBase/src/Credentials.cpp | 6 +++--- lib/TLS/src/Method.cpp | 6 +++--- lib/wxExtend | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/EAPBase/src/Credentials.cpp b/lib/EAPBase/src/Credentials.cpp index fdbb0e5..beae064 100644 --- a/lib/EAPBase/src/Credentials.cpp +++ b/lib/EAPBase/src/Credentials.cpp @@ -1,5 +1,5 @@ /* - Copyright 2015-2016 Amebis + Copyright 2015-2018 Amebis Copyright 2016 GÉANT This file is part of GÉANTLink. @@ -734,8 +734,8 @@ inline static basic_string<_Elem, _Traits, _Ax> kph_encode(_In_ unsigned char da { // Encode one byte of data. _Elem str[3] = { - 'A' + (data >> 4 ), - 'a' + (data & 0x0f), + static_cast<_Elem>('A' + (data >> 4 )), + static_cast<_Elem>('a' + (data & 0x0f)), }; return str; } diff --git a/lib/TLS/src/Method.cpp b/lib/TLS/src/Method.cpp index a2bf371..ff645ba 100644 --- a/lib/TLS/src/Method.cpp +++ b/lib/TLS/src/Method.cpp @@ -1,5 +1,5 @@ /* - Copyright 2015-2016 Amebis + Copyright 2015-2018 Amebis Copyright 2016 GÉANT This file is part of GÉANTLink. @@ -215,7 +215,7 @@ void eap::method_tls::begin_session( PCCERT_CONTEXT certs[] = { m_cred.m_cert ? (PCCERT_CONTEXT)m_cred.m_cert : NULL }; SCHANNEL_CRED cred = { SCHANNEL_CRED_VERSION, // dwVersion - m_cred.m_cert ? 1 : 0, // cCreds + m_cred.m_cert ? 1ul : 0ul, // cCreds certs, // paCred NULL, // hRootStore: Not valid for client credentials 0, // cMappers @@ -236,7 +236,7 @@ void eap::method_tls::begin_session( SCH_CRED_IGNORE_REVOCATION_OFFLINE | // dwFlags: Ignore offline-revocation errors - we do not expect to have network connection yet SCH_CRED_NO_DEFAULT_CREDS | // dwFlags: If client certificate we provided is not acceptable, do not try to select one on your own (m_cfg.m_server_names.empty() ? SCH_CRED_NO_SERVERNAME_CHECK : 0) | // dwFlags: When no expected server name is given, do not do the server name check. - 0x00400000 /*SCH_USE_STRONG_CRYPTO*/, // dwFlags: Do not use broken ciphers + 0x00400000ul /*SCH_USE_STRONG_CRYPTO*/, // dwFlags: Do not use broken ciphers 0 // dwCredFormat }; SECURITY_STATUS stat = m_sc_cred.acquire(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &cred); diff --git a/lib/wxExtend b/lib/wxExtend index 321e1c3..b161059 160000 --- a/lib/wxExtend +++ b/lib/wxExtend @@ -1 +1 @@ -Subproject commit 321e1c389e2be356f34ba5712cd833a182b88467 +Subproject commit b16105985577ab3485d860926c5dcd7e6b32be2e