mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Minor fixes prompted by `lint'.
Published in <sxsadwt2nkg.fsf@florida.arsdigita.de>.
This commit is contained in:
parent
057eb9d671
commit
dd84231c6a
@ -1,3 +1,32 @@
|
||||
2001-12-09 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* url.c (reencode_string): Declare static.
|
||||
|
||||
* res.c (registered_specs): Declare static.
|
||||
|
||||
* progress.c (current_impl_locked): Declare static.
|
||||
|
||||
* log.c (flush_log_p): Declare static.
|
||||
(needs_flushing): Ditto.
|
||||
|
||||
* http.c (digest_authentication_encode): Declare static.
|
||||
|
||||
* html-url.c (init_interesting): Declare static.
|
||||
|
||||
* host.c (host_name_addresses_map): Declare static.
|
||||
|
||||
* cookies.c (find_matching_chains): Declare static.
|
||||
|
||||
* ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak
|
||||
indicated by lint.
|
||||
|
||||
* utils.c (path_simplify): Remove unused variable STUB_CHAR.
|
||||
|
||||
* host.c (address_list_set_faulty): Document that INDEX is
|
||||
currently unused.
|
||||
|
||||
* url.c (rewrite_shorthand_url): Remove unused variable PATH.
|
||||
|
||||
2001-12-08 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* version.c: Wget 1.8-pre2 is released.
|
||||
|
@ -825,7 +825,7 @@ set_cookie_header_cb (const char *hdr, void *closure)
|
||||
SIZE matches are written; if more matches are present, return the
|
||||
number of chains that would have been written. */
|
||||
|
||||
int
|
||||
static int
|
||||
find_matching_chains (const char *host, int port,
|
||||
struct cookie *store[], int size)
|
||||
{
|
||||
|
@ -577,6 +577,10 @@ ftp_parse_vms_ls (const char *file)
|
||||
}
|
||||
dir = l = NULL;
|
||||
|
||||
/* #### The next three lines are a memory leak because they don't
|
||||
bother to free the pointer that read_whole_line() returns!
|
||||
FIXME! */
|
||||
|
||||
/* Empty line */
|
||||
read_whole_line (fp);
|
||||
/* "Directory PUB$DEVICE[PUB]" */
|
||||
|
@ -69,7 +69,7 @@ extern int h_errno;
|
||||
|
||||
/* Mapping between known hosts and to lists of their addresses. */
|
||||
|
||||
struct hash_table *host_name_addresses_map;
|
||||
static struct hash_table *host_name_addresses_map;
|
||||
|
||||
/* Lists of addresses. This should eventually be extended to handle
|
||||
IPv6. */
|
||||
@ -124,6 +124,13 @@ address_list_match_all (struct address_list *al1, struct address_list *al2)
|
||||
void
|
||||
address_list_set_faulty (struct address_list *al, int index)
|
||||
{
|
||||
#if 0
|
||||
/* Warning: INDEX is unused, so this assumes that the address list
|
||||
is traversed in order. In the next release, either enable this
|
||||
assert, or use INDEX. */
|
||||
assert (index == al->faulty);
|
||||
#endif
|
||||
|
||||
++al->faulty;
|
||||
if (al->faulty >= al->count)
|
||||
/* All addresses have been proven faulty. Since there's not much
|
||||
|
@ -140,7 +140,7 @@ static const char *additional_attributes[] = {
|
||||
static const char **interesting_tags;
|
||||
static const char **interesting_attributes;
|
||||
|
||||
void
|
||||
static void
|
||||
init_interesting (void)
|
||||
{
|
||||
/* Init the variables interesting_tags and interesting_attributes
|
||||
|
@ -2164,7 +2164,7 @@ dump_hash (unsigned char *buf, const unsigned char *hash)
|
||||
|
||||
/* Take the line apart to find the challenge, and compose a digest
|
||||
authorization header. See RFC2069 section 2.1.2. */
|
||||
char *
|
||||
static char *
|
||||
digest_authentication_encode (const char *au, const char *user,
|
||||
const char *passwd, const char *method,
|
||||
const char *path)
|
||||
|
@ -53,8 +53,8 @@ static FILE *logfp;
|
||||
int save_log_p;
|
||||
|
||||
/* Whether the log is flushed after each command. */
|
||||
int flush_log_p = 1;
|
||||
int needs_flushing;
|
||||
static int flush_log_p = 1;
|
||||
static int needs_flushing;
|
||||
|
||||
/* In the event of a hang-up, and if its output was on a TTY, Wget
|
||||
redirects its output to `wget-log'.
|
||||
|
@ -64,7 +64,7 @@ static struct progress_implementation implementations[] = {
|
||||
{ "bar", bar_create, bar_update, bar_finish, bar_set_params }
|
||||
};
|
||||
static struct progress_implementation *current_impl;
|
||||
int current_impl_locked;
|
||||
static int current_impl_locked;
|
||||
|
||||
/* Progress implementation used by default. Can be overriden in
|
||||
wgetrc or by the fallback one. */
|
||||
|
@ -470,7 +470,7 @@ res_match_path (const struct robot_specs *specs, const char *path)
|
||||
|
||||
/* Registering the specs. */
|
||||
|
||||
struct hash_table *registered_specs;
|
||||
static struct hash_table *registered_specs;
|
||||
|
||||
/* Stolen from cookies.c. */
|
||||
#define SET_HOSTPORT(host, port, result) do { \
|
||||
|
@ -334,7 +334,7 @@ decide_copy_method (const char *p)
|
||||
"foo+bar" -> "foo+bar" (plus is reserved!)
|
||||
"foo%2b+bar" -> "foo%2b+bar" */
|
||||
|
||||
char *
|
||||
static char *
|
||||
reencode_string (const char *s)
|
||||
{
|
||||
const char *p1;
|
||||
@ -559,19 +559,17 @@ rewrite_shorthand_url (const char *url)
|
||||
|
||||
if (*p == ':')
|
||||
{
|
||||
const char *pp, *path;
|
||||
const char *pp;
|
||||
char *res;
|
||||
/* If the characters after the colon and before the next slash
|
||||
or end of string are all digits, it's HTTP. */
|
||||
int digits = 0;
|
||||
for (pp = p + 1; ISDIGIT (*pp); pp++)
|
||||
++digits;
|
||||
if (digits > 0
|
||||
&& (*pp == '/' || *pp == '\0'))
|
||||
if (digits > 0 && (*pp == '/' || *pp == '\0'))
|
||||
goto http;
|
||||
|
||||
/* Prepend "ftp://" to the entire URL... */
|
||||
path = p + 1;
|
||||
res = xmalloc (6 + strlen (url) + 1);
|
||||
sprintf (res, "ftp://%s", url);
|
||||
/* ...and replace ':' with '/'. */
|
||||
|
@ -512,13 +512,10 @@ path_simplify (char *path)
|
||||
{
|
||||
register int i, start;
|
||||
int changes = 0;
|
||||
char stub_char;
|
||||
|
||||
if (!*path)
|
||||
return 0;
|
||||
|
||||
stub_char = '/';
|
||||
|
||||
if (path[0] == '/')
|
||||
/* Preserve initial '/'. */
|
||||
++path;
|
||||
|
Loading…
Reference in New Issue
Block a user