1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Fix -Wcast-function-type warnings on Windows/MinGW

After de8feb1f3a, some warnings remained
that were only visible when using GCC on Windows.  Fix those as well.

Note that the ecpg test source files don't use the full pg_config.h,
so we can't use pg_funcptr_t there but have to do it the long way.
This commit is contained in:
Peter Eisentraut
2020-10-21 08:17:51 +02:00
parent 19ae53c92d
commit 8a58347a3c
11 changed files with 22 additions and 22 deletions

View File

@ -99,7 +99,7 @@ int main()
#ifndef WIN32
pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)test_thread, (void *) (n + 1), 0, NULL);
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n + 1), 0, NULL);
#endif
}

View File

@ -99,7 +99,7 @@ int main()
#ifndef WIN32
pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) test_thread, (void *) (n+1), 0, NULL);
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n+1), 0, NULL);
#endif
}

View File

@ -68,7 +68,7 @@ int main()
#ifndef WIN32
pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)test_thread, (void *) (n + 1), 0, NULL);
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n + 1), 0, NULL);
#endif
}

View File

@ -68,7 +68,7 @@ int main()
#ifndef WIN32
pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) test_thread, (void *) (n+1), 0, NULL);
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n+1), 0, NULL);
#endif
}