fix pthread 3rd arg voidptr warning

pull/2694/head
Nicolas Sauzede 2019-11-07 22:58:49 +01:00 committed by Alexander Medvednikov
parent 0ca75f7782
commit 3a99217592
2 changed files with 2 additions and 2 deletions

View File

@ -664,7 +664,7 @@ fn (p mut Parser) async_fn_call(f Fn, method_ph int, receiver_var, receiver_type
p.genln(' CreateThread(0,0, $wrapper_name, $parg, 0,0);') p.genln(' CreateThread(0,0, $wrapper_name, $parg, 0,0);')
} }
else { else {
p.genln('int $tmp2 = pthread_create(& $thread_name, NULL, $wrapper_name, $parg);') p.genln('int $tmp2 = pthread_create(& $thread_name, NULL, (void *)$wrapper_name, $parg);')
} }
p.check(.rpar) p.check(.rpar)
} }

View File

@ -56,7 +56,7 @@ fn (v &V) generate_hotcode_reloading_main_caller() {
cgen.genln(' char *live_library_name = "$so_name";') cgen.genln(' char *live_library_name = "$so_name";')
cgen.genln(' load_so(live_library_name);') cgen.genln(' load_so(live_library_name);')
cgen.genln(' pthread_t _thread_so;') cgen.genln(' pthread_t _thread_so;')
cgen.genln(' pthread_create(&_thread_so , NULL, &reload_so, live_library_name);') cgen.genln(' pthread_create(&_thread_so , NULL, (void *)&reload_so, live_library_name);')
} else { } else {
// windows: // windows:
so_name := file_base + if v.pref.ccompiler == 'msvc' {'.dll'} else {'.so'} so_name := file_base + if v.pref.ccompiler == 'msvc' {'.dll'} else {'.so'}