From c88f5c8ba6c26fde8ff6c3ccee939543ad2ff69c Mon Sep 17 00:00:00 2001 From: Alexander Afanasyev Date: Sun, 28 Jun 2015 18:36:25 -0700 Subject: [PATCH] Static cast type narrowing (prevent failures in C++11 mode with clang compiler) --- wake.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wake.cpp b/wake.cpp index e0f194e6..6dbb18a4 100644 --- a/wake.cpp +++ b/wake.cpp @@ -25,13 +25,13 @@ void WAKE_Base::GenKey(word32 k0, word32 k1, word32 k2, word32 k3) CRYPTOPP_COMPILE_ASSERT(sizeof(x) == 4); static unsigned int tt[10]= { 0x726a8f3b, // table - 0xe69a3b5c, - 0xd3c71fe5, - 0xab3c73d2, + static_cast(0xe69a3b5c), + static_cast(0xd3c71fe5), + static_cast(0xab3c73d2), 0x4d3a8eb3, 0x0396d6e8, 0x3d4c2f7a, - 0x9ee27cf3, } ; + static_cast(0x9ee27cf3), } ; t[0] = k0; t[1] = k1; t[2] = k2;