mdbx: resolve all warnings from MinGW.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2022-03-30 18:13:08 +03:00
parent 21da42d23d
commit 6f37c8e57f
9 changed files with 47 additions and 4 deletions

View File

@@ -78,6 +78,12 @@ time from_ms(uint64_t ms) {
return result;
}
#if __GNUC_PREREQ(8, 0) && \
(defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif /* GCC/MINGW */
time now_realtime() {
#if defined(_WIN32) || defined(_WIN64) || defined(_WINDOWS)
static void(WINAPI * query_time)(LPFILETIME);
@@ -133,4 +139,9 @@ time now_monotonic() {
#endif
}
#if __GNUC_PREREQ(8, 0) && \
(defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__))
#pragma GCC diagnostic pop
#endif /* GCC/MINGW */
} /* namespace chrono */

View File

@@ -75,7 +75,7 @@ void osal_setup(const std::vector<actor_config> &actors) {
if (!hEvent)
failure_perror("CreateEvent()", GetLastError());
hEvent = make_inheritable(hEvent);
log_trace("osal_setup: event %" PRIuPTR " -> %p", i, hEvent);
log_trace("osal_setup: event %u -> %p", i, hEvent);
events[i] = hEvent;
}