[msvc] Fix casts that result in an error when building with VS
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 10 Dec 2015 20:33:30 +0000 (21:33 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 10 Dec 2015 20:46:34 +0000 (21:46 +0100)
Those showed up after the recent C++ compliance commit.

mono/mini/aot-compiler.c
mono/tests/libtest.c

index 18bb69c1471df0e4ef6b1f7e6fee7f23d9893009..20a63a6c9279df4832735a4c1d4ca29de7fef459 100644 (file)
@@ -9069,7 +9069,7 @@ compile_methods (MonoAotCompile *acfg)
                        user_data [1] = acfg;
                        user_data [2] = frag;
                        
-                       handle = mono_threads_create_thread ((unsigned int (*)(void *))compile_thread_main, user_data, 0, 0, NULL);
+                       handle = mono_threads_create_thread ((LPTHREAD_START_ROUTINE)compile_thread_main, user_data, 0, 0, NULL);
                        g_ptr_array_add (threads, handle);
                }
                g_free (methods);
index aeb95e5579c4fcf95f7b8e66d657239b74efd4fc..de80d9f693f06a8e96a032c2da3cbb9423792e19 100644 (file)
@@ -1067,7 +1067,7 @@ typedef int (STDCALL *SimpleDelegate9) (return_int_fnt d);
 LIBTEST_API int STDCALL 
 mono_test_marshal_delegate9 (SimpleDelegate9 delegate, gpointer ftn)
 {
-       return delegate ((int (*)(int))ftn);
+       return delegate ((return_int_fnt)ftn);
 }
 
 static int STDCALL 
@@ -3624,7 +3624,7 @@ test_method_thunk (int test_id, gpointer test_method_handle, gpointer create_obj
                goto done;
        }
 
-       CreateObject = (gpointer (*)(gpointer *))mono_method_get_unmanaged_thunk (create_object_method_handle);
+       CreateObject = (gpointer (STDCALL *)(gpointer *))mono_method_get_unmanaged_thunk (create_object_method_handle);
        if (!CreateObject) {
                ret = 3;
                goto done;