Index: src/backend/port/win32/signal.c =================================================================== --- src/backend/port/win32/signal.c (HEAD) +++ src/backend/port/win32/signal.c (working copy) @@ -251,7 +251,7 @@ char pipename[128]; HANDLE pipe = pgwin32_initial_signal_pipe; - snprintf(pipename, sizeof(pipename), "\\\\.\\pipe\\pgsignal_%u", GetCurrentProcessId()); + snprintf(pipename, sizeof(pipename), "\\\\.\\pipe\\pgsignal_%lu", GetCurrentProcessId()); for (;;) { Index: src/port/exec.c =================================================================== --- src/port/exec.c (revision 1820) +++ src/port/exec.c (working copy) @@ -695,7 +695,6 @@ DWORD dwNewAclSize; DWORD dwSize = 0; DWORD dwTokenInfoLength = 0; - DWORD dwResult = 0; HANDLE hToken = NULL; PACL pacl = NULL; PSID psidUser = NULL; @@ -707,7 +706,7 @@ /* Get the token for the process */ if (!OpenProcessToken(hProcess, TOKEN_QUERY | TOKEN_ADJUST_DEFAULT, &hToken)) { - log_error("could not open process token: %ui", GetLastError()); + log_error("could not open process token: %lu", GetLastError()); goto cleanup; } @@ -719,19 +718,19 @@ ptdd = (TOKEN_DEFAULT_DACL *) LocalAlloc(LPTR, dwSize); if (ptdd == NULL) { - log_error("could not allocate %i bytes of memory", dwSize); + log_error("could not allocate %lu bytes of memory", dwSize); goto cleanup; } if (!GetTokenInformation(hToken, tic, (LPVOID) ptdd, dwSize, &dwSize)) { - log_error("could not get token information: %ui", GetLastError()); + log_error("could not get token information: %lu", GetLastError()); goto cleanup; } } else { - log_error("could not get token information buffer size: %ui", GetLastError()); + log_error("could not get token information buffer size: %lu", GetLastError()); goto cleanup; } } @@ -741,14 +740,14 @@ (DWORD) sizeof(ACL_SIZE_INFORMATION), AclSizeInformation)) { - log_error("could not get ACL information: %ui", GetLastError()); + log_error("could not get ACL information: %lu", GetLastError()); goto cleanup; } /* Get the SID for the current user. We need to add this to the ACL. */ if (!GetUserSid(&psidUser, hToken)) { - log_error("could not get user SID: %ui", GetLastError()); + log_error("could not get user SID: %lu", GetLastError()); goto cleanup; } @@ -759,13 +758,13 @@ pacl = (PACL) LocalAlloc(LPTR, dwNewAclSize); if (pacl == NULL) { - log_error("could not allocate %i bytes of memory", dwNewAclSize); + log_error("could not allocate %lu bytes of memory", dwNewAclSize); goto cleanup; } if (!InitializeAcl(pacl, dwNewAclSize, ACL_REVISION)) { - log_error("could not initialize ACL: %ui", GetLastError()); + log_error("could not initialize ACL: %lu", GetLastError()); goto cleanup; } @@ -774,13 +773,13 @@ { if (!GetAce(ptdd->DefaultDacl, i, (LPVOID *) & pace)) { - log_error("could not get ACE: %ui", GetLastError()); + log_error("could not get ACE: %lu", GetLastError()); goto cleanup; } if (!AddAce(pacl, ACL_REVISION, MAXDWORD, pace, ((PACE_HEADER) pace)->AceSize)) { - log_error("could not add ACE: %ui", GetLastError()); + log_error("could not add ACE: %lu", GetLastError()); goto cleanup; } } @@ -788,7 +787,7 @@ /* Add the new ACE for the current user */ if (!AddAccessAllowedAce(pacl, ACL_REVISION, GENERIC_ALL, psidUser)) { - log_error("could not add access allowed ACE: %ui", GetLastError()); + log_error("could not add access allowed ACE: %lu", GetLastError()); goto cleanup; } @@ -797,7 +796,7 @@ if (!SetTokenInformation(hToken, tic, (LPVOID) & tddNew, dwNewAclSize)) { - log_error("could not set token information: %ui", GetLastError()); + log_error("could not set token information: %lu", GetLastError()); goto cleanup; } @@ -828,8 +827,6 @@ GetUserSid(PSID * ppSidUser, HANDLE hToken) { DWORD dwLength; - DWORD cbName = 250; - DWORD cbDomainName = 250; PTOKEN_USER pTokenUser = NULL; @@ -845,13 +842,13 @@ if (pTokenUser == NULL) { - log_error("could not allocate %ui bytes of memory", dwLength); + log_error("could not allocate %lu bytes of memory", dwLength); return FALSE; } } else { - log_error("could not get token information buffer size: %ui", GetLastError()); + log_error("could not get token information buffer size: %lu", GetLastError()); return FALSE; } } @@ -865,7 +862,7 @@ HeapFree(GetProcessHeap(), 0, pTokenUser); pTokenUser = NULL; - log_error("could not get token information: %ui", GetLastError()); + log_error("could not get token information: %lu", GetLastError()); return FALSE; }