Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ca5a75f

Browse files
committed
Silence compiler warning about casting HANDLE to long on WIN64.
1 parent a7cb69a commit ca5a75f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/regress/pg_regress.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -2277,8 +2277,14 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
22772277

22782278
postmaster_running = true;
22792279

2280+
#ifdef WIN64
2281+
/* need a series of two casts to convert HANDLE without compiler warning */
2282+
#define ULONGPID(x) (unsigned long) (unsigned long long) (x)
2283+
#else
2284+
#define ULONGPID(x) (unsigned long) (x)
2285+
#endif
22802286
printf(_("running on port %d with pid %lu\n"),
2281-
port, (unsigned long) postmaster_pid);
2287+
port, ULONGPID(postmaster_pid));
22822288
}
22832289
else
22842290
{

0 commit comments

Comments
 (0)