From 38122c22241cb8fe64f0d17cd3b084418f49edaa Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 28 Feb 2009 04:54:54 -0400 Subject: Corrected warnings g++-4.3.3 was complaining about --- lib/fdstream.h | 2 +- lib/sha1.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/fdstream.h b/lib/fdstream.h index a74a5781..af352c2c 100644 --- a/lib/fdstream.h +++ b/lib/fdstream.h @@ -68,7 +68,7 @@ class fdoutbuf : public std::streambuf { // write one character virtual int_type overflow (int_type c) { if (c != EOF) { - char z = c; + char z = static_cast(c); if (write (fd, &z, 1) != 1) { return EOF; } diff --git a/lib/sha1.cpp b/lib/sha1.cpp index cc2e49de..8689d711 100644 --- a/lib/sha1.cpp +++ b/lib/sha1.cpp @@ -552,14 +552,14 @@ void SHA1::PadMessage() /* * Store the message length as the last 8 octets */ - Message_Block[56] = (Length_High >> 24) & 0xFF; - Message_Block[57] = (Length_High >> 16) & 0xFF; - Message_Block[58] = (Length_High >> 8) & 0xFF; - Message_Block[59] = (Length_High) & 0xFF; - Message_Block[60] = (Length_Low >> 24) & 0xFF; - Message_Block[61] = (Length_Low >> 16) & 0xFF; - Message_Block[62] = (Length_Low >> 8) & 0xFF; - Message_Block[63] = (Length_Low) & 0xFF; + Message_Block[56] = static_cast((Length_High >> 24) & 0xFF); + Message_Block[57] = static_cast((Length_High >> 16) & 0xFF); + Message_Block[58] = static_cast((Length_High >> 8) & 0xFF); + Message_Block[59] = static_cast((Length_High) & 0xFF); + Message_Block[60] = static_cast((Length_Low >> 24) & 0xFF); + Message_Block[61] = static_cast((Length_Low >> 16) & 0xFF); + Message_Block[62] = static_cast((Length_Low >> 8) & 0xFF); + Message_Block[63] = static_cast((Length_Low) & 0xFF); ProcessMessageBlock(); } -- cgit v1.2.3