diff --git a/CMakeLists.txt b/CMakeLists.txt index de31be747..489ba2538 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,7 @@ endif() if(WIN32) add_compile_options($<$:-Wno-bad-function-cast>) +add_compile_options(-Wno-cast-function-type) set(FS_LIB stdc++fs) endif(WIN32) diff --git a/llarp/dnsc.cpp b/llarp/dnsc.cpp index f3cea6f5b..70907f04e 100644 --- a/llarp/dnsc.cpp +++ b/llarp/dnsc.cpp @@ -299,7 +299,7 @@ generic_handle_dnsc_recvfrom(dnsc_answer_request *request, llarp::LogDebug("Read an authority for ", request->question.name, " at ", std::to_string(pos)); // castBuf += answer->name.length() + 4 + 4 + 4 + answer->rdLen; - if(pos > sz) + if((ssize_t)pos > sz) { llarp::LogWarn("Would read past end of dns packet. for ", request->question.name); diff --git a/llarp/ev_win32.hpp b/llarp/ev_win32.hpp index 510006522..3f7f37830 100644 --- a/llarp/ev_win32.hpp +++ b/llarp/ev_win32.hpp @@ -248,7 +248,6 @@ namespace llarp setup() { llarp::LogDebug("set ifname to ", t->ifname); - strncpy(tunif->if_name, t->ifname, IFNAMSIZ); if(tuntap_start(tunif, TUNTAP_MODE_TUNNEL, 0) == -1) {