diff --git a/.dockerignore b/.dockerignore index 6f31401f7..820b7f7c7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,4 @@ build/ .vscode/ +lokinet +lokinet.exe diff --git a/.travis.yml b/.travis.yml index 8813217bb..df24d81e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,10 @@ matrix: dist: xenial env: DOCKER_FILE=docker/alpine-windows.Dockerfile services: docker + - os: linux + dist: xenial + env: DOCKER_FILE=docker/gcc-trunk.Dockerfile + services: docker - os: linux dist: xenial compiler: gcc @@ -57,6 +61,10 @@ matrix: dist: xenial env: DOCKER_FILE=docker/alpine-windows.Dockerfile services: docker + - os: linux + dist: xenial + env: DOCKER_FILE=docker/gcc-trunk.Dockerfile + services: docker env: global: diff --git a/docker/alpine-windows.Dockerfile b/docker/alpine-windows.Dockerfile index b23c81a83..406f79836 100644 --- a/docker/alpine-windows.Dockerfile +++ b/docker/alpine-windows.Dockerfile @@ -6,4 +6,4 @@ RUN apk update && \ WORKDIR /src/ COPY . /src/ -RUN make windows NINJA=ninja +RUN make windows-release NINJA=ninja STATIC_LINK=ON diff --git a/docker/gcc-trunk.Dockerfile b/docker/gcc-trunk.Dockerfile new file mode 100644 index 000000000..c8028f47e --- /dev/null +++ b/docker/gcc-trunk.Dockerfile @@ -0,0 +1,14 @@ +FROM gcc:latest + +RUN apt update && \ + apt install -y cmake git libcap-dev curl ninja-build libuv1-dev + +WORKDIR /src/ + +COPY . /src/ + +RUN mkdir build && \ + cd build && \ + cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DWARNINGS_AS_ERRORS=ON && \ + ninja -k0 && \ + ./test/testAll diff --git a/llarp/messages/relay_status.cpp b/llarp/messages/relay_status.cpp index 68aa51380..5ca6b07d1 100644 --- a/llarp/messages/relay_status.cpp +++ b/llarp/messages/relay_status.cpp @@ -172,7 +172,7 @@ namespace llarp } bool - LR_StatusMessage::AddFrame(const SharedSecret& pathKey, uint64_t status) + LR_StatusMessage::AddFrame(const SharedSecret& pathKey, uint64_t newStatus) { frames[7] = frames[6]; frames[6] = frames[5]; @@ -188,7 +188,7 @@ namespace llarp LR_StatusRecord record; - record.status = status; + record.status = newStatus; record.version = LLARP_PROTO_VERSION; llarp_buffer_t buf(frame.data(), frame.size()); diff --git a/llarp/messages/relay_status.hpp b/llarp/messages/relay_status.hpp index 8186a443f..fd8684123 100644 --- a/llarp/messages/relay_status.hpp +++ b/llarp/messages/relay_status.hpp @@ -86,7 +86,7 @@ namespace llarp uint64_t status); bool - AddFrame(const SharedSecret &pathKey, uint64_t status); + AddFrame(const SharedSecret &pathKey, uint64_t newStatus); static void QueueSendMessage(AbstractRouter *router, const RouterID nextHop, diff --git a/llarp/net/net_addr.cpp b/llarp/net/net_addr.cpp index 5138dc969..b90604482 100644 --- a/llarp/net/net_addr.cpp +++ b/llarp/net/net_addr.cpp @@ -83,7 +83,6 @@ namespace llarp bool Addr::from_char_array(string_view in) { - auto str = in.begin(); auto pPosition = in.find(':'); if(pPosition != string_view::npos) { diff --git a/llarp/path/path.cpp b/llarp/path/path.cpp index c3585cff1..91c800925 100644 --- a/llarp/path/path.cpp +++ b/llarp/path/path.cpp @@ -103,8 +103,8 @@ namespace llarp } bool - Path::HandleLRSM(uint64_t status, std::array< EncryptedFrame, 8 >& frames, - AbstractRouter* r) + Path::HandleLRSM(ABSL_ATTRIBUTE_UNUSED uint64_t status, + std::array< EncryptedFrame, 8 >& frames, AbstractRouter* r) { uint64_t currentStatus = status; diff --git a/llarp/router/router.cpp b/llarp/router/router.cpp index 50ba767c8..734d6f35c 100644 --- a/llarp/router/router.cpp +++ b/llarp/router/router.cpp @@ -714,7 +714,7 @@ namespace llarp } void - Router::HandleDHTLookupForExplore(RouterID remote, + Router::HandleDHTLookupForExplore(ABSL_ATTRIBUTE_UNUSED RouterID remote, const std::vector< RouterContact > &results) { for(const auto &rc : results) diff --git a/llarp/router_contact.cpp b/llarp/router_contact.cpp index a4d3b54ae..7ab78174d 100644 --- a/llarp/router_contact.cpp +++ b/llarp/router_contact.cpp @@ -382,21 +382,6 @@ namespace llarp return BDecode(&buf); } - RouterContact & - RouterContact::operator=(const RouterContact &other) - { - addrs = other.addrs; - exits = other.exits; - signature = other.signature; - last_updated = other.last_updated; - enckey = other.enckey; - pubkey = other.pubkey; - nickname = other.nickname; - version = other.version; - netID = other.netID; - return *this; - } - std::ostream & RouterContact::print(std::ostream &stream, int level, int spaces) const { diff --git a/llarp/router_contact.hpp b/llarp/router_contact.hpp index 7638e167c..a65f7bcea 100644 --- a/llarp/router_contact.hpp +++ b/llarp/router_contact.hpp @@ -150,9 +150,6 @@ namespace llarp bool DecodeKey(const llarp_buffer_t &k, llarp_buffer_t *buf); - RouterContact & - operator=(const RouterContact &other); - bool HasNick() const; diff --git a/llarp/service/endpoint_state.cpp b/llarp/service/endpoint_state.cpp index 78b26891b..63b52aedf 100644 --- a/llarp/service/endpoint_state.cpp +++ b/llarp/service/endpoint_state.cpp @@ -43,7 +43,7 @@ namespace llarp if(k == "paths") { const auto val = atoi(v.c_str()); - if(val >= 1 && val <= path::PathSet::max_paths) + if(val >= 1 && val <= static_cast(path::PathSet::max_paths)) { ep.numPaths = val; LogInfo(name, " set number of paths to ", ep.numHops); @@ -56,7 +56,7 @@ namespace llarp if(k == "hops") { const auto val = atoi(v.c_str()); - if(val >= 1 && val <= path::max_len) + if(val >= 1 && val <= static_cast(path::max_len)) { ep.numHops = val; LogInfo(name, " set number of hops to ", ep.numHops);