Merge pull request #322 from arvidn/gcc-warnings

fix gcc warnings
This commit is contained in:
Arvid Norberg 2015-12-12 09:05:56 -05:00
commit b0e56f0ec8
2 changed files with 3 additions and 1 deletions

View File

@ -386,7 +386,7 @@ void run_test(lt::aux::proxy_settings ps, std::string url, int expect_size, int
TEST_EQUAL(e, error_code()); TEST_EQUAL(e, error_code());
TEST_EQUAL(counters.size(), expect_counters.size()); TEST_EQUAL(counters.size(), expect_counters.size());
for (int i = 0; i < counters.size(); ++i) for (int i = 0; i < int(counters.size()); ++i)
{ {
if (counters[i] != expect_counters[i]) fprintf(stderr, "i=%d\n", i); if (counters[i] != expect_counters[i]) fprintf(stderr, "i=%d\n", i);
TEST_EQUAL(counters[i], expect_counters[i]); TEST_EQUAL(counters[i], expect_counters[i]);

View File

@ -1636,6 +1636,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER {
} }
} }
#if !TORRENT_USE_PREADV
bool coalesce_read_buffers(file::iovec_t const*& bufs, int& num_bufs, file::iovec_t* tmp) bool coalesce_read_buffers(file::iovec_t const*& bufs, int& num_bufs, file::iovec_t* tmp)
{ {
int buf_size = bufs_size(bufs, num_bufs); int buf_size = bufs_size(bufs, num_bufs);
@ -1672,6 +1673,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER {
num_bufs = 1; num_bufs = 1;
return true; return true;
} }
#endif // TORRENT_USE_PREADV
template <class Fun> template <class Fun>
boost::int64_t iov(Fun f, handle_type fd, boost::int64_t file_offset, file::iovec_t const* bufs_in boost::int64_t iov(Fun f, handle_type fd, boost::int64_t file_offset, file::iovec_t const* bufs_in