Skip to content
Snippets Groups Projects
Commit 30796e62 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Correct warning fixes

parent 3375eb60
No related branches found
No related tags found
No related merge requests found
Pipeline #11201 canceled
......@@ -6,6 +6,8 @@
#include <functional>
#include <ftl/uri.hpp>
#include <ftl/net/common.hpp>
using std::size_t;
namespace ftl {
......@@ -44,7 +46,7 @@ int ws_dispatch(const char *data, size_t len, std::function<void(const wsheader_
*/
int ws_prepare(wsheader_type::opcode_type, bool useMask, size_t len, char *buffer, size_t maxlen);
bool ws_connect(int sockfd, const ftl::URI &uri);
bool ws_connect(SOCKET sockfd, const ftl::URI &uri);
};
};
......
......@@ -5,8 +5,6 @@
//#define GLOG_NO_ABBREVIATED_SEVERITIES
#include <loguru.hpp>
#include <ftl/net/common.hpp>
#include <cstring>
#include <ftl/net/ws_internal.hpp>
#include <memory>
......
......@@ -34,7 +34,7 @@ using std::chrono::milliseconds;
class MockPeer : public Peer {
public:
MockPeer() : Peer(0) {}
MockPeer() : Peer(INVALID_SOCKET) {}
void mock_data() { data(); }
};
......@@ -45,7 +45,7 @@ static std::map<int, std::string> fakedata;
#ifdef WIN32
int ftl::net::internal::recv(SOCKET sd, char *buf, int n, int f) {
#else
ssize_t ftl::net::internal::recv(int sd, void *buf, size_t n, int f) {
ssize_t ftl::net::internal::recv(SOCKET sd, void *buf, size_t n, int f) {
#endif
if (fakedata.count(sd) == 0) {
std::cout << "Unrecognised socket" << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment