Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion libs/mime/test/mime-roundtrip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ void test_roundtrip(const char *fileName) {
BOOST_CHECK_EQUAL(readfile(fileName), from_mime(mp));
}

void test_expected_parse_fail(const char *) {}
}

using namespace boost::unit_test;
Expand Down
4 changes: 3 additions & 1 deletion libs/network/example/http/fileserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <sys/fcntl.h>
#include <unistd.h>
#include <iostream>
#include <cassert>

namespace http = boost::network::http;
namespace utils = boost::network::utils;
Expand Down Expand Up @@ -142,7 +143,8 @@ struct connection_handler : boost::enable_shared_from_this<connection_handler> {
void handle_chunk(std::pair<void *, std::size_t> mmaped_region, off_t offset,
server::connection_ptr connection,
boost::system::error_code const &ec) {
if (!ec && offset < mmaped_region.second)
assert(offset>=0);
if (!ec && static_cast<std::size_t>(offset) < mmaped_region.second)
send_file(mmaped_region, offset, connection);
}

Expand Down