Skip to content

0.11 devel- GCC compilation warnings fixed #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 2, 2015
Merged
Changes from 1 commit
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
Prev Previous commit
GCC warning on signed/unsigned comparison fixed
  • Loading branch information
el-bart committed Feb 1, 2015
commit ba3b3f34d32766c08d02f770670f4b8c6f92e2d0
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