aboutsummaryrefslogtreecommitdiff
path: root/sokol_fetch.h
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2020-06-04 18:52:15 +0200
committerAndre Weissflog <floooh@gmail.com>2020-06-04 18:52:15 +0200
commit340ce7dc2f141adba0f524e0b1deb6fa6e8fa2ac (patch)
tree77b0ad308bf679edeeb58ed7c4b646611b796cfd /sokol_fetch.h
parent786c003e0fed12175533dd98c847ab005158d753 (diff)
sokol_fetch.h: fix two unused variable warnings in release mode in Windows code path
Diffstat (limited to 'sokol_fetch.h')
-rw-r--r--sokol_fetch.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sokol_fetch.h b/sokol_fetch.h
index 07ce2af1..44aff84b 100644
--- a/sokol_fetch.h
+++ b/sokol_fetch.h
@@ -993,6 +993,10 @@ inline sfetch_handle_t sfetch_send(const sfetch_request_t& request) { return sfe
#endif
#endif
+#ifndef _SOKOL_UNUSED
+ #define _SOKOL_UNUSED(x) (void)(x)
+#endif
+
#if defined(__EMSCRIPTEN__)
#include <emscripten/emscripten.h>
#define _SFETCH_PLATFORM_EMSCRIPTEN (1)
@@ -1692,6 +1696,7 @@ _SOKOL_PRIVATE void _sfetch_thread_join(_sfetch_thread_t* thread) {
EnterCriticalSection(&thread->incoming_critsec);
_sfetch_thread_request_stop(thread);
BOOL set_event_res = SetEvent(thread->incoming_event);
+ _SOKOL_UNUSED(set_event_res);
SOKOL_ASSERT(set_event_res);
LeaveCriticalSection(&thread->incoming_critsec);
WaitForSingleObject(thread->thread, INFINITE);
@@ -1726,6 +1731,7 @@ _SOKOL_PRIVATE void _sfetch_thread_enqueue_incoming(_sfetch_thread_t* thread, _s
}
LeaveCriticalSection(&thread->incoming_critsec);
BOOL set_event_res = SetEvent(thread->incoming_event);
+ _SOKOL_UNUSED(set_event_res);
SOKOL_ASSERT(set_event_res);
}
}