test: Avoid a warning about a cast to a smaller integer type on 64 bit architectures
This commit is contained in:
1 parent
5fe2e05419
commit
f4272deea5
1 file changed
+2
-1
+2
-1
@@ -19,6 +19,7 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
static __declspec(thread) int tlsvar = 1;
|
||||
@@ -27,7 +28,7 @@ static __thread int tlsvar = 1;
|
||||
#endif
|
||||
|
||||
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);
|
||||
tlsvar = id + 100;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
||||
Reference in new issue
Block a user