unittest + compiler warnings

This commit is contained in:
Benjamin Sergeant 2019-01-05 21:10:08 -08:00
parent 4d587e35d8
commit cc8a9e883e
3 changed files with 6 additions and 6 deletions

View File

@ -154,7 +154,7 @@ namespace ix
{ {
if (isCancellationRequested()) return false; if (isCancellationRequested()) return false;
int ret; ssize_t ret;
ret = recv(buffer, 1); ret = recv(buffer, 1);
// We read one byte, as needed, all good. // We read one byte, as needed, all good.
@ -197,7 +197,7 @@ namespace ix
char* buffer = const_cast<char*>(str.c_str()); char* buffer = const_cast<char*>(str.c_str());
int len = (int) str.size(); int len = (int) str.size();
int ret = send(buffer, len); ssize_t ret = send(buffer, len);
// We wrote some bytes, as needed, all good. // We wrote some bytes, as needed, all good.
if (ret > 0) if (ret > 0)

View File

@ -43,9 +43,9 @@ namespace ix
{ {
errMsg = "no error"; errMsg = "no error";
auto fd = socket(address->ai_family, int fd = (int) socket(address->ai_family,
address->ai_socktype, address->ai_socktype,
address->ai_protocol); address->ai_protocol);
if (fd < 0) if (fd < 0)
{ {
errMsg = "Cannot create a socket"; errMsg = "Cannot create a socket";

View File

@ -42,7 +42,7 @@ namespace ix
std::cout << "Sending request: " << request std::cout << "Sending request: " << request
<< "to " << host << ":" << port << "to " << host << ":" << port
<< std::endl; << std::endl;
socket->writeBytes(request, isCancellationRequested); REQUIRE(socket->writeBytes(request, isCancellationRequested));
auto lineResult = socket->readLine(isCancellationRequested); auto lineResult = socket->readLine(isCancellationRequested);
auto lineValid = lineResult.first; auto lineValid = lineResult.first;