ktorrent/ktorrent-fix-compiler_warning.diff

28 lines
705 B
Diff

Index: libktorrent/util/mmapfile.cpp
===================================================================
--- libktorrent/util/mmapfile.cpp (Revision 494561)
+++ libktorrent/util/mmapfile.cpp (Arbeitskopie)
@@ -164,6 +164,7 @@
void MMapFile::growFile(Uint64 new_size)
{
+ Uint32 written;
Out() << "Growing file to " << new_size << " bytes " << endl;
Uint64 to_write = new_size - file_size;
// jump to the end of the file
@@ -176,12 +177,12 @@
{
if (to_write < 1024)
{
- ::write(fd,buf,to_write);
+ written = ::write(fd,buf,to_write);
to_write = 0;
}
else
{
- ::write(fd,buf,1024);
+ written = ::write(fd,buf,1024);
to_write -= 1024;
}
}