test: Avoid a warning about a cast to a smaller integer type on 64 bit architectures

This commit is contained in:
Martin Storsjö committed 2020-03-04 14:01:26 +02:00
1 parent 5fe2e05419
commit f4272deea5
1 file changed
+2 -1
+2 -1
View File
@@ -19,6 +19,7 @@
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <process.h> #include <process.h>
#include <stdint.h>
#if defined(_MSC_VER) #if defined(_MSC_VER)
static __declspec(thread) int tlsvar = 1; static __declspec(thread) int tlsvar = 1;
@@ -27,7 +28,7 @@ static __thread int tlsvar = 1;
#endif #endif
static unsigned __stdcall threadfunc(void* arg) { static unsigned __stdcall threadfunc(void* arg) {
int id = (int)arg; int id = (int)(intptr_t)arg;
printf("thread %d, tlsvar %p initially %d\n", id, &tlsvar, tlsvar); printf("thread %d, tlsvar %p initially %d\n", id, &tlsvar, tlsvar);
tlsvar = id + 100; tlsvar = id + 100;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {