2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed compiler warning
	* src/DefaultBtProgressInfoFile.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-07-22 13:20:47 +00:00
parent df8938d51e
commit a01a3605c7
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compiler warning
* src/DefaultBtProgressInfoFile.cc
2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compiler warning on 32bit systems. Fixed compiler warning on 32bit systems.

View File

@ -258,7 +258,7 @@ void DefaultBtProgressInfoFile::load()
array_ptr<unsigned char> savedInfoHash(new unsigned char[infoHashLength]); array_ptr<unsigned char> savedInfoHash(new unsigned char[infoHashLength]);
in.read(reinterpret_cast<char*> in.read(reinterpret_cast<char*>
(static_cast<unsigned char*>(savedInfoHash)), infoHashLength); (static_cast<unsigned char*>(savedInfoHash)), infoHashLength);
CHECK_STREAM(in, infoHashLength); CHECK_STREAM(in, static_cast<int>(infoHashLength));
if(infoHashCheckEnabled) { if(infoHashCheckEnabled) {
const unsigned char* infoHash = bittorrent::getInfoHash(_dctx); const unsigned char* infoHash = bittorrent::getInfoHash(_dctx);
if(infoHashLength != INFO_HASH_LENGTH || if(infoHashLength != INFO_HASH_LENGTH ||
@ -321,7 +321,7 @@ void DefaultBtProgressInfoFile::load()
array_ptr<unsigned char> savedBitfield(new unsigned char[bitfieldLength]); array_ptr<unsigned char> savedBitfield(new unsigned char[bitfieldLength]);
in.read(reinterpret_cast<char*> in.read(reinterpret_cast<char*>
(static_cast<unsigned char*>(savedBitfield)), bitfieldLength); (static_cast<unsigned char*>(savedBitfield)), bitfieldLength);
CHECK_STREAM(in, bitfieldLength); CHECK_STREAM(in, static_cast<int>(bitfieldLength));
if(pieceLength == _dctx->getPieceLength()) { if(pieceLength == _dctx->getPieceLength()) {
_pieceStorage->setBitfield(savedBitfield, bitfieldLength); _pieceStorage->setBitfield(savedBitfield, bitfieldLength);
@ -372,7 +372,7 @@ void DefaultBtProgressInfoFile::load()
(new unsigned char[bitfieldLength]); (new unsigned char[bitfieldLength]);
in.read(reinterpret_cast<char*> in.read(reinterpret_cast<char*>
(static_cast<unsigned char*>(pieceBitfield)), bitfieldLength); (static_cast<unsigned char*>(pieceBitfield)), bitfieldLength);
CHECK_STREAM(in, bitfieldLength); CHECK_STREAM(in, static_cast<int>(bitfieldLength));
piece->setBitfield(pieceBitfield, bitfieldLength); piece->setBitfield(pieceBitfield, bitfieldLength);
#ifdef ENABLE_MESSAGE_DIGEST #ifdef ENABLE_MESSAGE_DIGEST