mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
A small pile of Windows compiler-warning fixes.
These include an unused variable left over from the command-line refactoring; an explicit referencing of the module handle for sspicli.dll which we really do deliberately load and then don't (directly) use; a missing pointer-type cast in the Windows handle socket code; and two 32/64 bit integer size mismatches in the types of functions I was importing from system API DLLs. The last of those are a bit worrying, and suggest to me that after going to all that trouble to add type-checking of those runtime imports in commit 49fb598b0, I might have only checked the resulting compiler output in a 32-bit build and not a 64-bit one. Oops!
This commit is contained in:
parent
2a2153f4ce
commit
c05fdb7d61
@ -544,7 +544,8 @@ if (defined $makefiles{'clangcl'}) {
|
|||||||
&splitline("CFLAGS = /nologo /W3 /O1 " .
|
&splitline("CFLAGS = /nologo /W3 /O1 " .
|
||||||
(join " ", map {"-I$dirpfx$_"} @srcdirs) .
|
(join " ", map {"-I$dirpfx$_"} @srcdirs) .
|
||||||
" /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 ".
|
" /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 ".
|
||||||
"/D_CRT_SECURE_NO_WARNINGS")."\n".
|
"/D_CRT_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS").
|
||||||
|
"\n".
|
||||||
"LFLAGS = /incremental:no /dynamicbase /nxcompat\n".
|
"LFLAGS = /incremental:no /dynamicbase /nxcompat\n".
|
||||||
&splitline("RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs).
|
&splitline("RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs).
|
||||||
" -DWIN32 -D_WIN32 -DWINVER=0x0400")."\n".
|
" -DWIN32 -D_WIN32 -DWINVER=0x0400")."\n".
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
DECL_WINDOWS_FUNCTION(static, void, InitCommonControls, (void));
|
DECL_WINDOWS_FUNCTION(static, void, InitCommonControls, (void));
|
||||||
DECL_WINDOWS_FUNCTION(static, BOOL, MakeDragList, (HWND));
|
DECL_WINDOWS_FUNCTION(static, BOOL, MakeDragList, (HWND));
|
||||||
DECL_WINDOWS_FUNCTION(static, int, LBItemFromPt, (HWND, POINT, BOOL));
|
DECL_WINDOWS_FUNCTION(static, int, LBItemFromPt, (HWND, POINT, BOOL));
|
||||||
DECL_WINDOWS_FUNCTION(static, int, DrawInsert, (HWND, HWND, int));
|
DECL_WINDOWS_FUNCTION(static, void, DrawInsert, (HWND, HWND, int));
|
||||||
|
|
||||||
void init_common_controls(void)
|
void init_common_controls(void)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ const struct keyvalwhere gsslibkeywords[] = {
|
|||||||
|
|
||||||
DECL_WINDOWS_FUNCTION(static, SECURITY_STATUS,
|
DECL_WINDOWS_FUNCTION(static, SECURITY_STATUS,
|
||||||
AcquireCredentialsHandleA,
|
AcquireCredentialsHandleA,
|
||||||
(SEC_CHAR *, SEC_CHAR *, ULONG, PLUID,
|
(SEC_CHAR *, SEC_CHAR *, ULONG, PVOID,
|
||||||
PVOID, SEC_GET_KEY_FN, PVOID, PCredHandle, PTimeStamp));
|
PVOID, SEC_GET_KEY_FN, PVOID, PCredHandle, PTimeStamp));
|
||||||
DECL_WINDOWS_FUNCTION(static, SECURITY_STATUS,
|
DECL_WINDOWS_FUNCTION(static, SECURITY_STATUS,
|
||||||
InitializeSecurityContextA,
|
InitializeSecurityContextA,
|
||||||
|
@ -19,7 +19,7 @@ static int requested_help;
|
|||||||
static char *help_path;
|
static char *help_path;
|
||||||
static int help_has_contents;
|
static int help_has_contents;
|
||||||
#ifndef NO_HTMLHELP
|
#ifndef NO_HTMLHELP
|
||||||
DECL_WINDOWS_FUNCTION(static, HWND, HtmlHelpA, (HWND, LPCSTR, UINT, DWORD));
|
DECL_WINDOWS_FUNCTION(static, HWND, HtmlHelpA, (HWND, LPCSTR, UINT, DWORD_PTR));
|
||||||
static char *chm_path;
|
static char *chm_path;
|
||||||
#endif /* NO_HTMLHELP */
|
#endif /* NO_HTMLHELP */
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ static void handle_socket_unfreeze(void *psv)
|
|||||||
bufchain_consume(&ps->inputdata, len);
|
bufchain_consume(&ps->inputdata, len);
|
||||||
ps->defer_close = FALSE;
|
ps->defer_close = FALSE;
|
||||||
if (ps->deferred_close) {
|
if (ps->deferred_close) {
|
||||||
sk_handle_close(ps);
|
sk_handle_close((Socket)ps);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +106,7 @@ char *get_username(void)
|
|||||||
sspicli.dll WITHOUT proper path sanitizing, so better
|
sspicli.dll WITHOUT proper path sanitizing, so better
|
||||||
load it properly before */
|
load it properly before */
|
||||||
HMODULE sspicli = load_system32_dll("sspicli.dll");
|
HMODULE sspicli = load_system32_dll("sspicli.dll");
|
||||||
|
(void)sspicli; /* squash compiler warning about unused variable */
|
||||||
GET_WINDOWS_FUNCTION(secur32, GetUserNameExA);
|
GET_WINDOWS_FUNCTION(secur32, GetUserNameExA);
|
||||||
tried_usernameex = TRUE;
|
tried_usernameex = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -201,8 +201,8 @@ DECL_WINDOWS_FUNCTION(static, int, getaddrinfo,
|
|||||||
DECL_WINDOWS_FUNCTION(static, void, freeaddrinfo, (struct addrinfo *res));
|
DECL_WINDOWS_FUNCTION(static, void, freeaddrinfo, (struct addrinfo *res));
|
||||||
DECL_WINDOWS_FUNCTION(static, int, getnameinfo,
|
DECL_WINDOWS_FUNCTION(static, int, getnameinfo,
|
||||||
(const struct sockaddr FAR * sa, socklen_t salen,
|
(const struct sockaddr FAR * sa, socklen_t salen,
|
||||||
char FAR * host, size_t hostlen, char FAR * serv,
|
char FAR * host, DWORD hostlen, char FAR * serv,
|
||||||
size_t servlen, int flags));
|
DWORD servlen, int flags));
|
||||||
DECL_WINDOWS_FUNCTION(static, char *, gai_strerror, (int ecode));
|
DECL_WINDOWS_FUNCTION(static, char *, gai_strerror, (int ecode));
|
||||||
DECL_WINDOWS_FUNCTION(static, int, WSAAddressToStringA,
|
DECL_WINDOWS_FUNCTION(static, int, WSAAddressToStringA,
|
||||||
(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFO,
|
(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFO,
|
||||||
|
@ -297,7 +297,6 @@ int main(int argc, char **argv)
|
|||||||
int skcount, sksize;
|
int skcount, sksize;
|
||||||
int exitcode;
|
int exitcode;
|
||||||
int errors;
|
int errors;
|
||||||
int got_host = FALSE;
|
|
||||||
int use_subsystem = 0;
|
int use_subsystem = 0;
|
||||||
int just_test_share_exists = FALSE;
|
int just_test_share_exists = FALSE;
|
||||||
unsigned long now, next, then;
|
unsigned long now, next, then;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user