Fix warnings from clang-analyzer 3.6

This commit is contained in:
Tim Ruehsen 2014-11-18 20:44:56 +01:00
parent 94b8458af1
commit 50ec4d9c3d
4 changed files with 70 additions and 59 deletions

View File

@ -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>
* http.c: use c_strncasecmp() in BEGINS_WITH macro

View File

@ -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));
#endif
err = 0;
#if HAVE_GNUTLS_PRIORITY_SET_DIRECT
switch (opt.secure_protocol)
{

View File

@ -474,7 +474,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
/* Create the big type-3 message binary blob */
size = (size_t) snprintf (ntlmbuf, sizeof(ntlmbuf),
snprintf (ntlmbuf, sizeof (ntlmbuf),
"NTLMSSP%c"
"\x03%c%c%c" /* type-3, 32 bits */

View File

@ -3428,6 +3428,7 @@ Remote file exists.\n\n"));
xfree_null (hstat.message);
xfree_null (hstat.error);
hstat.message = NULL;
hstat.error = NULL;
continue;
} /* send_head_first */
} /* !got_head */