summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-28 04:54:54 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-28 04:54:54 -0400
commit38122c22241cb8fe64f0d17cd3b084418f49edaa (patch)
tree9383f2082602f2d71dde5328fa8bcf3f6609a5b7 /lib
parentfb129fa7a1b293d3a04513aee3ca4a489f094754 (diff)
downloadfork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.tar.gz
fork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.tar.bz2
fork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.zip
Corrected warnings g++-4.3.3 was complaining about
Diffstat (limited to 'lib')
-rw-r--r--lib/fdstream.h2
-rw-r--r--lib/sha1.cpp16
2 files changed, 9 insertions, 9 deletions
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<char>(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<char>((Length_High >> 24) & 0xFF);
+ Message_Block[57] = static_cast<char>((Length_High >> 16) & 0xFF);
+ Message_Block[58] = static_cast<char>((Length_High >> 8) & 0xFF);
+ Message_Block[59] = static_cast<char>((Length_High) & 0xFF);
+ Message_Block[60] = static_cast<char>((Length_Low >> 24) & 0xFF);
+ Message_Block[61] = static_cast<char>((Length_Low >> 16) & 0xFF);
+ Message_Block[62] = static_cast<char>((Length_Low >> 8) & 0xFF);
+ Message_Block[63] = static_cast<char>((Length_Low) & 0xFF);
ProcessMessageBlock();
}