From 6cbb2353cbd4869fcd1581742da8db809dd57d40 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 3 Oct 2007 15:59:13 +0000 Subject: Tweak recently-added tests to suppress scary-looking warnings on 64-bit 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. --- src/interfaces/ecpg/test/thread/alloc.pgc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interfaces/ecpg/test/thread/alloc.pgc') diff --git a/src/interfaces/ecpg/test/thread/alloc.pgc b/src/interfaces/ecpg/test/thread/alloc.pgc index 9c56c070c53..1b28d3a5b60 100644 --- a/src/interfaces/ecpg/test/thread/alloc.pgc +++ b/src/interfaces/ecpg/test/thread/alloc.pgc @@ -41,7 +41,7 @@ static void* fn(void* arg) 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; @@ -78,7 +78,7 @@ int main (int argc, char** argv) 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 -- cgit v1.2.3