Commit 61fd2c51 authored by Magnus Hagander's avatar Magnus Hagander

Change warning-silencing code not to cast the pointer type, instead

casting the value of the variable later.

Per comments from Tom.
parent 16c46d5d
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.58 2009/01/27 12:46:16 mha Exp $ * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.59 2009/01/28 15:32:21 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1333,9 +1333,9 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests) ...@@ -1333,9 +1333,9 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
while (tests_left > 0) while (tests_left > 0)
{ {
PID_TYPE p; PID_TYPE p;
int exit_status;
#ifndef WIN32 #ifndef WIN32
int exit_status;
p = wait(&exit_status); p = wait(&exit_status);
if (p == INVALID_PID) if (p == INVALID_PID)
...@@ -1345,6 +1345,7 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests) ...@@ -1345,6 +1345,7 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
exit_nicely(2); exit_nicely(2);
} }
#else #else
DWORD exit_status;
int r; int r;
r = WaitForMultipleObjects(tests_left, active_pids, FALSE, INFINITE); 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) ...@@ -1364,11 +1365,11 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
if (p == pids[i]) if (p == pids[i])
{ {
#ifdef WIN32 #ifdef WIN32
GetExitCodeProcess(pids[i], (LPDWORD) &exit_status); GetExitCodeProcess(pids[i], &exit_status);
CloseHandle(pids[i]); CloseHandle(pids[i]);
#endif #endif
pids[i] = INVALID_PID; pids[i] = INVALID_PID;
statuses[i] = exit_status; statuses[i] = (int) exit_status;
if (names) if (names)
status(" %s", names[i]); status(" %s", names[i]);
tests_left--; tests_left--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment