From c9104a596fb73069fa1a4a75fd7c9ab13f264a1f Mon Sep 17 00:00:00 2001 From: Anonymissimus Date: Sun, 5 Jun 2011 01:50:42 +0000 Subject: [PATCH] mute some MSVC warnings (since I don't understand what's up in that code this is the least intrusive way...) --- src/sha1.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/sha1.cpp b/src/sha1.cpp index e73f0c56ec7..dc5a988e81b 100644 --- a/src/sha1.cpp +++ b/src/sha1.cpp @@ -71,9 +71,16 @@ sha1_hash::sha1_hash(const std::string& str) if (bytes_left < 60) { // enough space to store the length // put the length at the end of the block block[60] = ssz >> 24; +#ifdef _MSC_VER +#pragma warning (push) +#pragma warning (disable: 4244) +#endif block[61] = ssz >> 16; block[62] = ssz >> 8; block[63] = ssz; +#ifdef _MSC_VER +#pragma warning (pop) +#endif } else { // not enough space for the zeros => we need a new block next(block); // new block @@ -85,9 +92,16 @@ sha1_hash::sha1_hash(const std::string& str) } // put the length at the end of the block block[60] = ssz >> 24; +#ifdef _MSC_VER +#pragma warning (push) +#pragma warning (disable: 4244) +#endif block[61] = ssz >> 16; block[62] = ssz >> 8; block[63] = ssz; +#ifdef _MSC_VER +#pragma warning (pop) +#endif } } next(block);