From 19e0014129b54ec3d0da187c836699d0cead74a2 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 28 Jan 2009 15:32:21 +0000 Subject: [PATCH] Change warning-silencing code not to cast the pointer type, instead casting the value of the variable later. Per comments from Tom. --- src/test/regress/pg_regress.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index db1e48178b..c31a2b7380 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -1333,9 +1333,9 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests) while (tests_left > 0) { PID_TYPE p; - int exit_status; #ifndef WIN32 + int exit_status; p = wait(&exit_status); if (p == INVALID_PID) @@ -1345,6 +1345,7 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests) exit_nicely(2); } #else + DWORD exit_status; int r; r = WaitForMultipleObjects(tests_left, active_pids, FALSE, INFINITE); @@ -1364,11 +1365,11 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests) if (p == pids[i]) { #ifdef WIN32 - GetExitCodeProcess(pids[i], (LPDWORD) &exit_status); + GetExitCodeProcess(pids[i], &exit_status); CloseHandle(pids[i]); #endif pids[i] = INVALID_PID; - statuses[i] = exit_status; + statuses[i] = (int) exit_status; if (names) status(" %s", names[i]); tests_left--; -- 2.39.5