fix r3777 compiler warning reported by SoftwareElves

This commit is contained in:
Charles Kerr 2007-11-10 05:01:13 +00:00
parent ca03b62a58
commit e7e479d758
2 changed files with 7 additions and 7 deletions

View File

@ -195,13 +195,13 @@ tr_ioRead( tr_torrent * tor,
}
int
tr_ioWrite( tr_torrent * tor,
int pieceIndex,
int begin,
int len,
uint8_t * buf )
tr_ioWrite( tr_torrent * tor,
int pieceIndex,
int begin,
int len,
const uint8_t * buf )
{
return readOrWritePiece( tor, TR_IO_WRITE, pieceIndex, begin, buf, len );
return readOrWritePiece( tor, TR_IO_WRITE, pieceIndex, begin, (void*)buf, len );
}
/****

View File

@ -38,7 +38,7 @@ typedef struct tr_io tr_io;
* TR_ERROR_IO_* otherwise.
**********************************************************************/
int tr_ioRead ( struct tr_torrent*, int index, int begin, int len, uint8_t * );
int tr_ioWrite ( struct tr_torrent *, int index, int begin, int len, uint8_t * );
int tr_ioWrite ( struct tr_torrent *, int index, int begin, int len, const uint8_t * );
/* hashes the specified piece and updates the completion accordingly. */
int tr_ioHash ( tr_torrent*, int piece );