1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 03:12:44 +00:00

(trunk libT) fix gcc compiler warning in libtransmission/makemeta.c: "ignoring return value of ‘read’, declared with attribute warn_unused_result"

This commit is contained in:
Jordan Lee 2011-02-09 05:16:37 +00:00
parent 62b732708a
commit adf5a2e273

View file

@ -235,10 +235,10 @@ getHashInfo( tr_metainfo_builder * b )
while( leftInPiece )
{
const size_t n_this_pass = (size_t) MIN( ( b->files[fileIndex].size - off ), leftInPiece );
read( fd, bufptr, n_this_pass );
bufptr += n_this_pass;
off += n_this_pass;
leftInPiece -= n_this_pass;
const ssize_t n_read = read( fd, bufptr, n_this_pass );
bufptr += n_read;
off += n_read;
leftInPiece -= n_read;
if( off == b->files[fileIndex].size )
{
off = 0;