machines about casts between pointers and integers of different sizes.
While they're harmless, we shouldn't expect users to have to go through
and figure that out for themselves.
#line 42 "alloc.pgc"
- value = (int)arg;
+ value = (long)arg;
sprintf(name, "Connection: %d", value);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , name, 0);
CloseHandle(threads[i]);
#else
for (i = 0; i < THREADS; ++i)
- pthread_create(&threads[i], NULL, fn, (void*)i);
+ pthread_create(&threads[i], NULL, fn, (void *) (long) i);
for (i = 0; i < THREADS; ++i)
pthread_join(threads[i], NULL);
#endif
#line 42 "prep.pgc"
- value = (int)arg;
+ value = (long)arg;
sprintf(name, "Connection: %d", value);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , name, 0);
CloseHandle(threads[i]);
#else
for (i = 0; i < THREADS; ++i)
- pthread_create(&threads[i], NULL, fn, (void*)i);
+ pthread_create(&threads[i], NULL, fn, (void *) (long) i);
for (i = 0; i < THREADS; ++i)
pthread_join(threads[i], NULL);
#endif
for( n = 0; n < nthreads; n++ )
{
#ifndef WIN32
- pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+ pthread_create(&threads[n], NULL, test_thread, (void *) (long) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)test_thread, (void *) (n + 1), 0, NULL);
#endif
for( n = 0; n < nthreads; n++ )
{
#ifndef WIN32
- pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+ pthread_create(&threads[n], NULL, test_thread, (void *) (long) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) test_thread, (void *) (n+1), 0, NULL);
#endif
char **r = NULL;
EXEC SQL END DECLARE SECTION;
- value = (int)arg;
+ value = (long)arg;
sprintf(name, "Connection: %d", value);
EXEC SQL CONNECT TO REGRESSDB1 AS :name;
CloseHandle(threads[i]);
#else
for (i = 0; i < THREADS; ++i)
- pthread_create(&threads[i], NULL, fn, (void*)i);
+ pthread_create(&threads[i], NULL, fn, (void *) (long) i);
for (i = 0; i < THREADS; ++i)
pthread_join(threads[i], NULL);
#endif
char query[256] = "INSERT INTO T VALUES ( ? )";
EXEC SQL END DECLARE SECTION;
- value = (int)arg;
+ value = (long)arg;
sprintf(name, "Connection: %d", value);
EXEC SQL CONNECT TO REGRESSDB1 AS :name;
CloseHandle(threads[i]);
#else
for (i = 0; i < THREADS; ++i)
- pthread_create(&threads[i], NULL, fn, (void*)i);
+ pthread_create(&threads[i], NULL, fn, (void *) (long) i);
for (i = 0; i < THREADS; ++i)
pthread_join(threads[i], NULL);
#endif
for( n = 0; n < nthreads; n++ )
{
#ifndef WIN32
- pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+ pthread_create(&threads[n], NULL, test_thread, (void *) (long) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)test_thread, (void *) (n + 1), 0, NULL);
#endif
for( n = 0; n < nthreads; n++ )
{
#ifndef WIN32
- pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+ pthread_create(&threads[n], NULL, test_thread, (void *) (long) (n + 1));
#else
threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) test_thread, (void *) (n+1), 0, NULL);
#endif