mirror of
https://github.com/mirror/wget.git
synced 2025-01-21 01:30:32 +08:00
Fix warnings from clang-analyzer 3.6
This commit is contained in:
parent
94b8458af1
commit
50ec4d9c3d
@ -1,3 +1,14 @@
|
|||||||
|
2014-11-18 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
|
* Fix warnings from clang-analyzer 3.6
|
||||||
|
|
||||||
|
gnutls.c:457:3: warning: Value stored to 'err' is never read
|
||||||
|
err = 0;
|
||||||
|
http-ntlm.c:477:5: warning: Value stored to 'size' is never read
|
||||||
|
size = (size_t) snprintf (ntlmbuf, sizeof(ntlmbuf),
|
||||||
|
http.c:1479:3: warning: Attempt to free released memory
|
||||||
|
xfree_null (hs->error);
|
||||||
|
|
||||||
2014-11-17 Tim Ruehsen <tim.ruehsen@gmx.de>
|
2014-11-17 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
* http.c: use c_strncasecmp() in BEGINS_WITH macro
|
* http.c: use c_strncasecmp() in BEGINS_WITH macro
|
||||||
|
@ -454,7 +454,6 @@ ssl_connect_wget (int fd, const char *hostname)
|
|||||||
gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) FD_TO_SOCKET (fd));
|
gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) FD_TO_SOCKET (fd));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
err = 0;
|
|
||||||
#if HAVE_GNUTLS_PRIORITY_SET_DIRECT
|
#if HAVE_GNUTLS_PRIORITY_SET_DIRECT
|
||||||
switch (opt.secure_protocol)
|
switch (opt.secure_protocol)
|
||||||
{
|
{
|
||||||
|
116
src/http-ntlm.c
116
src/http-ntlm.c
@ -474,82 +474,82 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
|
|
||||||
/* Create the big type-3 message binary blob */
|
/* Create the big type-3 message binary blob */
|
||||||
|
|
||||||
size = (size_t) snprintf (ntlmbuf, sizeof(ntlmbuf),
|
snprintf (ntlmbuf, sizeof (ntlmbuf),
|
||||||
"NTLMSSP%c"
|
"NTLMSSP%c"
|
||||||
"\x03%c%c%c" /* type-3, 32 bits */
|
"\x03%c%c%c" /* type-3, 32 bits */
|
||||||
|
|
||||||
"%c%c%c%c" /* LanManager length + allocated space */
|
"%c%c%c%c" /* LanManager length + allocated space */
|
||||||
"%c%c" /* LanManager offset */
|
"%c%c" /* LanManager offset */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"%c%c" /* NT-response length */
|
"%c%c" /* NT-response length */
|
||||||
"%c%c" /* NT-response allocated space */
|
"%c%c" /* NT-response allocated space */
|
||||||
"%c%c" /* NT-response offset */
|
"%c%c" /* NT-response offset */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"%c%c" /* domain length */
|
"%c%c" /* domain length */
|
||||||
"%c%c" /* domain allocated space */
|
"%c%c" /* domain allocated space */
|
||||||
"%c%c" /* domain name offset */
|
"%c%c" /* domain name offset */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"%c%c" /* user length */
|
"%c%c" /* user length */
|
||||||
"%c%c" /* user allocated space */
|
"%c%c" /* user allocated space */
|
||||||
"%c%c" /* user offset */
|
"%c%c" /* user offset */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"%c%c" /* host length */
|
"%c%c" /* host length */
|
||||||
"%c%c" /* host allocated space */
|
"%c%c" /* host allocated space */
|
||||||
"%c%c" /* host offset */
|
"%c%c" /* host offset */
|
||||||
"%c%c%c%c%c%c" /* 6 zeroes */
|
"%c%c%c%c%c%c" /* 6 zeroes */
|
||||||
|
|
||||||
"\xff\xff" /* message length */
|
"\xff\xff" /* message length */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"\x01\x82" /* flags */
|
"\x01\x82" /* flags */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
/* domain string */
|
/* domain string */
|
||||||
/* user string */
|
/* user string */
|
||||||
/* host string */
|
/* host string */
|
||||||
/* LanManager response */
|
/* LanManager response */
|
||||||
/* NT response */
|
/* NT response */
|
||||||
,
|
,
|
||||||
0, /* zero termination */
|
0, /* zero termination */
|
||||||
0,0,0, /* type-3 long, the 24 upper bits */
|
0, 0, 0, /* type-3 long, the 24 upper bits */
|
||||||
|
|
||||||
SHORTPAIR(0x18), /* LanManager response length, twice */
|
SHORTPAIR (0x18), /* LanManager response length, twice */
|
||||||
SHORTPAIR(0x18),
|
SHORTPAIR (0x18),
|
||||||
SHORTPAIR(lmrespoff),
|
SHORTPAIR (lmrespoff),
|
||||||
0x0, 0x0,
|
0x0, 0x0,
|
||||||
|
|
||||||
#ifdef USE_NTRESPONSES
|
#ifdef USE_NTRESPONSES
|
||||||
SHORTPAIR(0x18), /* NT-response length, twice */
|
SHORTPAIR (0x18), /* NT-response length, twice */
|
||||||
SHORTPAIR(0x18),
|
SHORTPAIR (0x18),
|
||||||
#else
|
#else
|
||||||
0x0, 0x0,
|
0x0, 0x0,
|
||||||
0x0, 0x0,
|
0x0, 0x0,
|
||||||
#endif
|
#endif
|
||||||
SHORTPAIR(ntrespoff),
|
SHORTPAIR (ntrespoff),
|
||||||
0x0, 0x0,
|
0x0, 0x0,
|
||||||
|
|
||||||
SHORTPAIR(domlen),
|
SHORTPAIR (domlen),
|
||||||
SHORTPAIR(domlen),
|
SHORTPAIR (domlen),
|
||||||
SHORTPAIR(domoff),
|
SHORTPAIR (domoff),
|
||||||
0x0, 0x0,
|
0x0, 0x0,
|
||||||
|
|
||||||
SHORTPAIR(userlen),
|
SHORTPAIR (userlen),
|
||||||
SHORTPAIR(userlen),
|
SHORTPAIR (userlen),
|
||||||
SHORTPAIR(useroff),
|
SHORTPAIR (useroff),
|
||||||
0x0, 0x0,
|
0x0, 0x0,
|
||||||
|
|
||||||
SHORTPAIR(hostlen),
|
SHORTPAIR (hostlen),
|
||||||
SHORTPAIR(hostlen),
|
SHORTPAIR (hostlen),
|
||||||
SHORTPAIR(hostoff),
|
SHORTPAIR (hostoff),
|
||||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||||
|
|
||||||
0x0, 0x0,
|
0x0, 0x0,
|
||||||
|
|
||||||
0x0, 0x0);
|
0x0, 0x0);
|
||||||
|
|
||||||
/* size is now 64 */
|
/* size is now 64 */
|
||||||
size=64;
|
size=64;
|
||||||
|
@ -3428,6 +3428,7 @@ Remote file exists.\n\n"));
|
|||||||
xfree_null (hstat.message);
|
xfree_null (hstat.message);
|
||||||
xfree_null (hstat.error);
|
xfree_null (hstat.error);
|
||||||
hstat.message = NULL;
|
hstat.message = NULL;
|
||||||
|
hstat.error = NULL;
|
||||||
continue;
|
continue;
|
||||||
} /* send_head_first */
|
} /* send_head_first */
|
||||||
} /* !got_head */
|
} /* !got_head */
|
||||||
|
Loading…
Reference in New Issue
Block a user