diff --git a/src/uvw/udp.hpp b/src/uvw/udp.hpp index 8d8961b8..72ec0ef9 100644 --- a/src/uvw/udp.hpp +++ b/src/uvw/udp.hpp @@ -107,7 +107,7 @@ class UDPHandle final: public Handle { if(nread > 0) { // data available (can be truncated) - udp.publish(UDPDataEvent{details::address(aptr), std::move(data), static_cast(nread), static_cast(flags & UV_UDP_PARTIAL)}); + udp.publish(UDPDataEvent{details::address(aptr), std::move(data), static_cast(nread), !(0 == (flags & UV_UDP_PARTIAL))}); } else if(nread == 0 && addr == nullptr) { // no more data to be read, doing nothing is fine } else if(nread == 0 && addr != nullptr) { diff --git a/test/uvw/file_req.cpp b/test/uvw/file_req.cpp index 936d8f8d..15edc70e 100644 --- a/test/uvw/file_req.cpp +++ b/test/uvw/file_req.cpp @@ -534,7 +534,9 @@ TEST(FileReq, Chown) { }); request->on>([](const auto &event, auto &req) { - req.chown(event.stat.st_uid, event.stat.st_gid); + auto uid = static_cast(event.stat.st_uid); + auto gid = static_cast(event.stat.st_gid); + req.chown(uid, gid); }); request->on>([](const auto &, auto &req) { @@ -560,7 +562,9 @@ TEST(FileReq, ChownSync) { auto statR = request->statSync(); ASSERT_TRUE(statR.first); - ASSERT_TRUE(request->chownSync(statR.second.st_uid, statR.second.st_gid)); + auto uid = static_cast(statR.second.st_uid); + auto gid = static_cast(statR.second.st_gid); + ASSERT_TRUE(request->chownSync(uid, gid)); ASSERT_TRUE(request->closeSync()); loop->run(); diff --git a/test/uvw/fs_req.cpp b/test/uvw/fs_req.cpp index 17d6a9bd..78b66838 100644 --- a/test/uvw/fs_req.cpp +++ b/test/uvw/fs_req.cpp @@ -665,7 +665,9 @@ TEST(FsReq, Chown) { }); fsReq->on>([&filename](const auto &event, auto &request) { - request.chown(filename, event.stat.st_uid, event.stat.st_gid); + auto uid = static_cast(event.stat.st_uid); + auto gid = static_cast(event.stat.st_gid); + request.chown(filename, uid, gid); }); fileReq->on>([&fsReq, &filename](const auto &, auto &) { @@ -697,7 +699,9 @@ TEST(FsReq, ChownSync) { auto statR = fsReq->statSync(filename); ASSERT_TRUE(statR.first); - ASSERT_TRUE(fsReq->chownSync(filename, statR.second.st_uid, statR.second.st_gid)); + auto uid = static_cast(statR.second.st_uid); + auto gid = static_cast(statR.second.st_gid); + ASSERT_TRUE(fsReq->chownSync(filename, uid, gid)); loop->run(); }