diff options
author | Yang Tse <yangsita@gmail.com> | 2011-08-14 16:36:47 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-08-14 16:36:47 +0200 |
commit | dc4f9d185da188f7b46cc6fadd86a24c333a9be8 (patch) | |
tree | d67a5b2cfc6c99d07e275d533c8c2a064059801f /lib | |
parent | 98fb0ef73ef212271895e87b8bd9a2d5b2baf6b6 (diff) |
http NTLM: fix 8 compiler warnings
Strict splitting of http_ntlm.[ch] may trigger 8 compiler warnings when
building with some compilers and strict compiler warnings enabled, depending
on other specific configuration options some could get triggered or not.
Seven are related with 'unused function parameters' and another one with
'var may be used before its value is set'.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_ntlm.c | 12 | ||||
-rw-r--r-- | lib/http_ntlm.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/curl_ntlm.c b/lib/curl_ntlm.c index a59b1fb21..dbf6e1a76 100644 --- a/lib/curl_ntlm.c +++ b/lib/curl_ntlm.c @@ -292,6 +292,10 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data, size_t size; unsigned char *buffer; +#if defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_WINDOWS_SSPI) + (void)data; +#endif + size = Curl_base64_decode(header, &buffer); if(!buffer) return CURLE_OUT_OF_MEMORY; @@ -786,6 +790,10 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, size_t hostoff = 0; size_t domoff = hostoff + hostlen; /* This is 0: remember that host and domain are empty */ + (void)userp; + (void)passwdp; + (void)ntlm; + #if USE_NTLM2SESSION #define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY #else @@ -895,6 +903,10 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, ULONG attrs; TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */ + (void)passwdp; + (void)userp; + (void)data; + type_2_desc.ulVersion = type_3_desc.ulVersion = SECBUFFER_VERSION; type_2_desc.cBuffers = type_3_desc.cBuffers = 1; type_2_desc.pBuffers = &type_2; diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 756ff527f..0813839dd 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -444,7 +444,7 @@ CURLcode Curl_output_ntlm_sso(struct connectdata *conn, CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) { - size_t size; + size_t size = 0; char *base64 = NULL; unsigned char ntlmbuf[NTLM_BUFSIZE]; CURLcode res; |