summaryrefslogtreecommitdiffstats
path: root/src/PolarSSL++
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-25 09:04:17 +0200
committerGitHub <noreply@github.com>2016-08-25 09:04:17 +0200
commitd52afadad491474f63e8184cb5a08c0ca21ab48c (patch)
treed5afab6035ca6bb0b58fd03ad5cfe3b3f8e1da55 /src/PolarSSL++
parentMerge pull request #3342 from cuberite/FixEmptyHeader (diff)
parentFixed type-casting-related warnings. (diff)
downloadcuberite-d52afadad491474f63e8184cb5a08c0ca21ab48c.tar
cuberite-d52afadad491474f63e8184cb5a08c0ca21ab48c.tar.gz
cuberite-d52afadad491474f63e8184cb5a08c0ca21ab48c.tar.bz2
cuberite-d52afadad491474f63e8184cb5a08c0ca21ab48c.tar.lz
cuberite-d52afadad491474f63e8184cb5a08c0ca21ab48c.tar.xz
cuberite-d52afadad491474f63e8184cb5a08c0ca21ab48c.tar.zst
cuberite-d52afadad491474f63e8184cb5a08c0ca21ab48c.zip
Diffstat (limited to 'src/PolarSSL++')
-rw-r--r--src/PolarSSL++/CMakeLists.txt4
-rw-r--r--src/PolarSSL++/RsaPrivateKey.cpp10
2 files changed, 5 insertions, 9 deletions
diff --git a/src/PolarSSL++/CMakeLists.txt b/src/PolarSSL++/CMakeLists.txt
index 375e6f51e..3d77e15d1 100644
--- a/src/PolarSSL++/CMakeLists.txt
+++ b/src/PolarSSL++/CMakeLists.txt
@@ -32,10 +32,6 @@ set(HDRS
X509Cert.h
)
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set_source_files_properties(RsaPrivateKey.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
-endif()
-
if(NOT MSVC)
add_library(PolarSSL++ ${SRCS} ${HDRS})
diff --git a/src/PolarSSL++/RsaPrivateKey.cpp b/src/PolarSSL++/RsaPrivateKey.cpp
index 17cede05f..50620ecd4 100644
--- a/src/PolarSSL++/RsaPrivateKey.cpp
+++ b/src/PolarSSL++/RsaPrivateKey.cpp
@@ -3,8 +3,8 @@
#include "Globals.h"
#include "RsaPrivateKey.h"
+#include <polarssl/pk.h>
#include "CtrDrbgContext.h"
-#include "polarssl/pk.h"
@@ -112,7 +112,7 @@ int cRsaPrivateKey::Decrypt(const Byte * a_EncryptedData, size_t a_EncryptedLeng
if (a_EncryptedLength < m_Rsa.len)
{
LOGD("%s: Invalid a_EncryptedLength: got %u, exp at least %u",
- __FUNCTION__, (unsigned)a_EncryptedLength, (unsigned)(m_Rsa.len)
+ __FUNCTION__, static_cast<unsigned>(a_EncryptedLength), static_cast<unsigned>(m_Rsa.len)
);
ASSERT(!"Invalid a_DecryptedMaxLength!");
return -1;
@@ -120,7 +120,7 @@ int cRsaPrivateKey::Decrypt(const Byte * a_EncryptedData, size_t a_EncryptedLeng
if (a_DecryptedMaxLength < m_Rsa.len)
{
LOGD("%s: Invalid a_DecryptedMaxLength: got %u, exp at least %u",
- __FUNCTION__, (unsigned)a_EncryptedLength, (unsigned)(m_Rsa.len)
+ __FUNCTION__, static_cast<unsigned>(a_EncryptedLength), static_cast<unsigned>(m_Rsa.len)
);
ASSERT(!"Invalid a_DecryptedMaxLength!");
return -1;
@@ -146,7 +146,7 @@ int cRsaPrivateKey::Encrypt(const Byte * a_PlainData, size_t a_PlainLength, Byte
if (a_EncryptedMaxLength < m_Rsa.len)
{
LOGD("%s: Invalid a_EncryptedMaxLength: got %u, exp at least %u",
- __FUNCTION__, (unsigned)a_EncryptedMaxLength, (unsigned)(m_Rsa.len)
+ __FUNCTION__, static_cast<unsigned>(a_EncryptedMaxLength), static_cast<unsigned>(m_Rsa.len)
);
ASSERT(!"Invalid a_DecryptedMaxLength!");
return -1;
@@ -154,7 +154,7 @@ int cRsaPrivateKey::Encrypt(const Byte * a_PlainData, size_t a_PlainLength, Byte
if (a_PlainLength < m_Rsa.len)
{
LOGD("%s: Invalid a_PlainLength: got %u, exp at least %u",
- __FUNCTION__, (unsigned)a_PlainLength, (unsigned)(m_Rsa.len)
+ __FUNCTION__, static_cast<unsigned>(a_PlainLength), static_cast<unsigned>(m_Rsa.len)
);
ASSERT(!"Invalid a_PlainLength!");
return -1;