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:
parent
62b732708a
commit
adf5a2e273
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue