Skip to content

Commit 61fd2c5

Browse files
committed
Change warning-silencing code not to cast the pointer type, instead
casting the value of the variable later. Per comments from Tom.
1 parent 16c46d5 commit 61fd2c5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/test/regress/pg_regress.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.58 2009/01/27 12:46:16 mha Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.59 2009/01/28 15:32:21 mha Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -1333,9 +1333,9 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
13331333
while (tests_left > 0)
13341334
{
13351335
PID_TYPE p;
1336-
int exit_status;
13371336

13381337
#ifndef WIN32
1338+
int exit_status;
13391339
p = wait(&exit_status);
13401340

13411341
if (p == INVALID_PID)
@@ -1345,6 +1345,7 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
13451345
exit_nicely(2);
13461346
}
13471347
#else
1348+
DWORD exit_status;
13481349
int r;
13491350

13501351
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)
13641365
if (p == pids[i])
13651366
{
13661367
#ifdef WIN32
1367-
GetExitCodeProcess(pids[i], (LPDWORD) &exit_status);
1368+
GetExitCodeProcess(pids[i], &exit_status);
13681369
CloseHandle(pids[i]);
13691370
#endif
13701371
pids[i] = INVALID_PID;
1371-
statuses[i] = exit_status;
1372+
statuses[i] = (int) exit_status;
13721373
if (names)
13731374
status(" %s", names[i]);
13741375
tests_left--;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy