compiler warning: fix
Fix compiler warning: expression has no effect
This commit is contained in:
@@ -89,6 +89,7 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
|
|||||||
size_t newlen = alloc;
|
size_t newlen = alloc;
|
||||||
int strindex=0;
|
int strindex=0;
|
||||||
size_t length;
|
size_t length;
|
||||||
|
CURLcode res;
|
||||||
|
|
||||||
ns = malloc(alloc);
|
ns = malloc(alloc);
|
||||||
if(!ns)
|
if(!ns)
|
||||||
@@ -116,7 +117,8 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Curl_convert_to_network(handle, &in, 1)) {
|
res = Curl_convert_to_network(handle, &in, 1);
|
||||||
|
if(res) {
|
||||||
/* Curl_convert_to_network calls failf if unsuccessful */
|
/* Curl_convert_to_network calls failf if unsuccessful */
|
||||||
free(ns);
|
free(ns);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -146,6 +148,7 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
|
|||||||
unsigned char in;
|
unsigned char in;
|
||||||
int strindex=0;
|
int strindex=0;
|
||||||
unsigned long hex;
|
unsigned long hex;
|
||||||
|
CURLcode res;
|
||||||
|
|
||||||
if(!ns)
|
if(!ns)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -164,7 +167,8 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
|
|||||||
|
|
||||||
in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */
|
in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */
|
||||||
|
|
||||||
if(Curl_convert_from_network(handle, &in, 1)) {
|
res = Curl_convert_from_network(handle, &in, 1);
|
||||||
|
if(res) {
|
||||||
/* Curl_convert_from_network calls failf if unsuccessful */
|
/* Curl_convert_from_network calls failf if unsuccessful */
|
||||||
free(ns);
|
free(ns);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -512,6 +512,7 @@ static void mk_lm_hash(struct SessionHandle *data,
|
|||||||
const char *password,
|
const char *password,
|
||||||
unsigned char *lmbuffer /* 21 bytes */)
|
unsigned char *lmbuffer /* 21 bytes */)
|
||||||
{
|
{
|
||||||
|
CURLcode res;
|
||||||
unsigned char pw[14];
|
unsigned char pw[14];
|
||||||
static const unsigned char magic[] = {
|
static const unsigned char magic[] = {
|
||||||
0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
|
0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
|
||||||
@@ -525,7 +526,8 @@ static void mk_lm_hash(struct SessionHandle *data,
|
|||||||
* The LanManager hashed password needs to be created using the
|
* The LanManager hashed password needs to be created using the
|
||||||
* password in the network encoding not the host encoding.
|
* password in the network encoding not the host encoding.
|
||||||
*/
|
*/
|
||||||
if(Curl_convert_to_network(data, (char *)pw, 14))
|
res = Curl_convert_to_network(data, (char *)pw, 14);
|
||||||
|
if(res)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -947,6 +949,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
|
|||||||
SECURITY_STATUS status;
|
SECURITY_STATUS status;
|
||||||
ULONG attrs;
|
ULONG attrs;
|
||||||
TimeStamp tsDummy; /* For Windows 9x compatibility of SPPI calls */
|
TimeStamp tsDummy; /* For Windows 9x compatibility of SPPI calls */
|
||||||
|
CURLcode res;
|
||||||
|
|
||||||
type_2_desc.ulVersion = type_3_desc.ulVersion = SECBUFFER_VERSION;
|
type_2_desc.ulVersion = type_3_desc.ulVersion = SECBUFFER_VERSION;
|
||||||
type_2_desc.cBuffers = type_3_desc.cBuffers = 1;
|
type_2_desc.cBuffers = type_3_desc.cBuffers = 1;
|
||||||
@@ -1265,8 +1268,9 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
|
|||||||
size += hostlen;
|
size += hostlen;
|
||||||
|
|
||||||
/* convert domain, user, and host to ASCII but leave the rest as-is */
|
/* convert domain, user, and host to ASCII but leave the rest as-is */
|
||||||
if(Curl_convert_to_network(conn->data, (char *)&ntlmbuf[domoff],
|
res = Curl_convert_to_network(conn->data, (char *)&ntlmbuf[domoff],
|
||||||
size-domoff))
|
size-domoff)
|
||||||
|
if(res)
|
||||||
return CURLE_CONV_FAILED;
|
return CURLE_CONV_FAILED;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user