diff --git a/renderdoc/os/linux/linux_threading.cpp b/renderdoc/os/linux/linux_threading.cpp index 01fe8d34f..b064bc105 100644 --- a/renderdoc/os/linux/linux_threading.cpp +++ b/renderdoc/os/linux/linux_threading.cpp @@ -162,7 +162,7 @@ namespace Threading TLSData *slots = (TLSData *)pthread_getspecific(OSTLSHandle); if(slots == NULL || slot-1 >= slots->data.size()) return NULL; - return slots->data[slot-1]; + return slots->data[(size_t)slot-1]; } void SetTLSValue(uint64_t slot, void *value) @@ -181,10 +181,10 @@ namespace Threading } if(slot-1 >= slots->data.size()) - slots->data.resize(slot); + slots->data.resize((size_t)slot); } - slots->data[slot-1] = value; + slots->data[(size_t)slot-1] = value; } ThreadHandle CreateThread(ThreadEntry entryFunc, void *userData) diff --git a/renderdoc/os/win32/win32_threading.cpp b/renderdoc/os/win32/win32_threading.cpp index 649783628..49762f2bd 100644 --- a/renderdoc/os/win32/win32_threading.cpp +++ b/renderdoc/os/win32/win32_threading.cpp @@ -157,7 +157,7 @@ namespace Threading TLSData *slots = (TLSData *)TlsGetValue(OSTLSHandle); if(slots == NULL || slot-1 >= slots->data.size()) return NULL; - return slots->data[slot-1]; + return slots->data[(size_t)slot-1]; } void SetTLSValue(uint64_t slot, void *value) @@ -176,10 +176,10 @@ namespace Threading } if(slot-1 >= slots->data.size()) - slots->data.resize(slot); + slots->data.resize((size_t)slot); } - slots->data[slot-1] = value; + slots->data[(size_t)slot-1] = value; } ThreadHandle CreateThread(ThreadEntry entryFunc, void *userData)