diff --git a/wpiutil/src/main/native/cpp/json_binary_writer.cpp b/wpiutil/src/main/native/cpp/json_binary_writer.cpp index 75c39aa763..2c0bbeea70 100644 --- a/wpiutil/src/main/native/cpp/json_binary_writer.cpp +++ b/wpiutil/src/main/native/cpp/json_binary_writer.cpp @@ -956,7 +956,7 @@ json::binary_writer::CharType json::binary_writer::ubjson_prefix(const json& j) case value_t::number_unsigned: { - if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) { return 'i'; } @@ -964,11 +964,11 @@ json::binary_writer::CharType json::binary_writer::ubjson_prefix(const json& j) { return 'U'; } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + else if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) { return 'I'; } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + else if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) { return 'l'; } diff --git a/wpiutil/src/main/native/libuv/include/uv/unix.h b/wpiutil/src/main/native/libuv/include/uv/unix.h index 5dae6ddfa2..34978e3388 100644 --- a/wpiutil/src/main/native/libuv/include/uv/unix.h +++ b/wpiutil/src/main/native/libuv/include/uv/unix.h @@ -191,7 +191,7 @@ typedef struct { int backend_fd; \ void* pending_queue[2]; \ void* watcher_queue[2]; \ - uv__io_t** watchers; \ + void** watchers; \ unsigned int nwatchers; \ unsigned int nfds; \ void* wq[2]; \ diff --git a/wpiutil/src/main/native/libuv/src/unix/core.cpp b/wpiutil/src/main/native/libuv/src/unix/core.cpp index df36747844..137a9bf0d8 100644 --- a/wpiutil/src/main/native/libuv/src/unix/core.cpp +++ b/wpiutil/src/main/native/libuv/src/unix/core.cpp @@ -794,7 +794,7 @@ static unsigned int next_power_of_two(unsigned int val) { } static void maybe_resize(uv_loop_t* loop, unsigned int len) { - uv__io_t** watchers; + void** watchers; void* fake_watcher_list; void* fake_watcher_count; unsigned int nwatchers; @@ -813,15 +813,15 @@ static void maybe_resize(uv_loop_t* loop, unsigned int len) { } nwatchers = next_power_of_two(len + 2) - 2; - watchers = (uv__io_t**) + watchers = (void**) uv__realloc(loop->watchers, (nwatchers + 2) * sizeof(loop->watchers[0])); if (watchers == NULL) abort(); for (i = loop->nwatchers; i < nwatchers; i++) watchers[i] = NULL; - watchers[nwatchers] = (uv__io_t*)fake_watcher_list; - watchers[nwatchers + 1] = (uv__io_t*)fake_watcher_count; + watchers[nwatchers] = fake_watcher_list; + watchers[nwatchers + 1] = fake_watcher_count; loop->watchers = watchers; loop->nwatchers = nwatchers; diff --git a/wpiutil/src/main/native/libuv/src/unix/kqueue.cpp b/wpiutil/src/main/native/libuv/src/unix/kqueue.cpp index 6e2b2bb9fd..57d96b74bf 100644 --- a/wpiutil/src/main/native/libuv/src/unix/kqueue.cpp +++ b/wpiutil/src/main/native/libuv/src/unix/kqueue.cpp @@ -258,7 +258,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { /* Skip invalidated events, see uv__platform_invalidate_fd */ if (fd == -1) continue; - w = loop->watchers[fd]; + w = (uv__io_t*)loop->watchers[fd]; if (w == NULL) { /* File descriptor that we've stopped watching, disarm it. diff --git a/wpiutil/src/main/native/libuv/src/unix/linux-core.cpp b/wpiutil/src/main/native/libuv/src/unix/linux-core.cpp index 3bf8beb559..375b93a76c 100644 --- a/wpiutil/src/main/native/libuv/src/unix/linux-core.cpp +++ b/wpiutil/src/main/native/libuv/src/unix/linux-core.cpp @@ -344,8 +344,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { nevents = 0; assert(loop->watchers != NULL); - loop->watchers[loop->nwatchers] = (uv__io_t*) events; - loop->watchers[loop->nwatchers + 1] = (uv__io_t*) (uintptr_t) nfds; + loop->watchers[loop->nwatchers] = events; + loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; for (i = 0; i < nfds; i++) { pe = events + i; fd = pe->data; @@ -357,7 +357,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { assert(fd >= 0); assert((unsigned) fd < loop->nwatchers); - w = loop->watchers[fd]; + w = (uv__io_t*)loop->watchers[fd]; if (w == NULL) { /* File descriptor that we've stopped watching, disarm it. diff --git a/wpiutil/src/main/native/libuv/src/unix/loop.cpp b/wpiutil/src/main/native/libuv/src/unix/loop.cpp index f990403d40..1458f6882d 100644 --- a/wpiutil/src/main/native/libuv/src/unix/loop.cpp +++ b/wpiutil/src/main/native/libuv/src/unix/loop.cpp @@ -129,7 +129,7 @@ int uv_loop_fork(uv_loop_t* loop) { /* Rearm all the watchers that aren't re-queued by the above. */ for (i = 0; i < loop->nwatchers; i++) { - w = loop->watchers[i]; + w = (uv__io_t*)loop->watchers[i]; if (w == NULL) continue;