From dbd3917bbef0a147e603311be1505127b5327c8b Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 28 Jun 2012 20:10:26 +0300 Subject: [PATCH] Botan: Fix warning GCC 4.7 warns about casting from (unsigned) byte to (signed) char Change-Id: I00f3a5159e6471b8d43c122350fa223a3b14f5df Reviewed-by: Christian Kandeler --- src/libs/3rdparty/botan/botan.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libs/3rdparty/botan/botan.cpp b/src/libs/3rdparty/botan/botan.cpp index ce11938e0fa..3642826788c 100644 --- a/src/libs/3rdparty/botan/botan.cpp +++ b/src/libs/3rdparty/botan/botan.cpp @@ -33386,20 +33386,18 @@ BigInt BigInt::decode(const byte buf[], size_t length, Base base) else if(base == Hexadecimal) { SecureVector binary; + const char *cbuf = reinterpret_cast(buf); if(length % 2) { // Handle lack of leading 0 - const char buf0_with_leading_0[2] = { '0', buf[0] }; + const char buf0_with_leading_0[2] = { '0', cbuf[0] }; binary = hex_decode(buf0_with_leading_0, 2); - binary += hex_decode(reinterpret_cast(&buf[1]), - length - 1, - false); + binary += hex_decode(&cbuf[1], length - 1, false); } else - binary = hex_decode(reinterpret_cast(buf), - length, false); + binary = hex_decode(cbuf, length, false); r.binary_decode(&binary[0], binary.size()); }