mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Automated merge.
This commit is contained in:
commit
c3135bea58
@ -1,3 +1,13 @@
|
||||
2008-05-31 Micah Cowan <micah@cowan.name>
|
||||
|
||||
* html-url.c, http.c: Avoid casts in a couple spots.
|
||||
|
||||
2008-05-30 Henri Häkkinen <henux@users.sourceforge.net>
|
||||
|
||||
* cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c,
|
||||
init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c,
|
||||
utils.c: Minor changes to silence warnings when using -Wall.
|
||||
|
||||
2008-05-26 Steven Schubiger <schubiger@gmail.com>
|
||||
|
||||
* ftp.c (getftp): Replace last remaining invocation of escnonprint
|
||||
|
@ -587,7 +587,7 @@ check_domain_match (const char *cookie_domain, const char *host)
|
||||
|
||||
if (dccount == 2)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int known_toplevel = false;
|
||||
static const char *known_toplevel_domains[] = {
|
||||
".com", ".edu", ".net", ".org", ".gov", ".mil", ".int"
|
||||
|
@ -189,7 +189,7 @@ ftp_login (int csock, const char *acc, const char *pass)
|
||||
"331 s/key ",
|
||||
"331 opiekey "
|
||||
};
|
||||
int i;
|
||||
size_t i;
|
||||
const char *seed = NULL;
|
||||
|
||||
for (i = 0; i < countof (skey_head); i++)
|
||||
@ -964,7 +964,7 @@ ftp_list (int csock, const char *file)
|
||||
int nwritten;
|
||||
uerr_t err;
|
||||
bool ok = false;
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
/* Try `LIST -a' first and revert to `LIST' in case of failure. */
|
||||
const char *list_commands[] = { "LIST -a",
|
||||
"LIST" };
|
||||
|
@ -226,7 +226,7 @@ prime_size (int size, int *prime_offset)
|
||||
243370577, 316381771, 411296309, 534685237, 695090819, 903618083,
|
||||
1174703521, 1527114613, 1837299131, 2147483647
|
||||
};
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = *prime_offset; i < countof (primes); i++)
|
||||
if (primes[i] >= size)
|
||||
|
@ -185,7 +185,7 @@ init_interesting (void)
|
||||
matches the user's preferences as specified through --ignore-tags
|
||||
and --follow-tags. */
|
||||
|
||||
int i;
|
||||
size_t i;
|
||||
interesting_tags = make_nocase_string_hash_table (countof (known_tags));
|
||||
|
||||
/* First, add all the tags we know hot to handle, mapped to their
|
||||
@ -355,7 +355,8 @@ append_url (const char *link_uri,
|
||||
static void
|
||||
tag_find_urls (int tagid, struct taginfo *tag, struct map_context *ctx)
|
||||
{
|
||||
int i, attrind;
|
||||
size_t i;
|
||||
int attrind;
|
||||
int first = -1;
|
||||
|
||||
for (i = 0; i < countof (tag_url_attributes); i++)
|
||||
@ -382,7 +383,7 @@ tag_find_urls (int tagid, struct taginfo *tag, struct map_context *ctx)
|
||||
/* Find whether TAG/ATTRIND is a combination that contains a
|
||||
URL. */
|
||||
char *link = tag->attrs[attrind].value;
|
||||
const int size = countof (tag_url_attributes);
|
||||
const size_t size = countof (tag_url_attributes);
|
||||
|
||||
/* If you're cringing at the inefficiency of the nested loops,
|
||||
remember that they both iterate over a very small number of
|
||||
|
@ -526,7 +526,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
||||
|
||||
/* Make sure that the user and domain strings fit in the target buffer
|
||||
before we copy them there. */
|
||||
if(size + userlen + domlen >= sizeof(ntlmbuf))
|
||||
if(((size_t) size + userlen + domlen) >= sizeof(ntlmbuf))
|
||||
return NULL;
|
||||
|
||||
memcpy(&ntlmbuf[size], domain, domlen);
|
||||
|
15
src/http.c
15
src/http.c
@ -2908,7 +2908,7 @@ http_atotm (const char *time_string)
|
||||
Netscape cookie specification.) */
|
||||
};
|
||||
const char *oldlocale;
|
||||
int i;
|
||||
size_t i;
|
||||
time_t ret = (time_t) -1;
|
||||
|
||||
/* Solaris strptime fails to recognize English month names in
|
||||
@ -3019,10 +3019,12 @@ digest_authentication_encode (const char *au, const char *user,
|
||||
au += 6; /* skip over `Digest' */
|
||||
while (extract_param (&au, &name, &value, ','))
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
size_t namelen = name.e - name.b;
|
||||
for (i = 0; i < countof (options); i++)
|
||||
if (name.e - name.b == strlen (options[i].name)
|
||||
&& 0 == strncmp (name.b, options[i].name, name.e - name.b))
|
||||
if (namelen == strlen (options[i].name)
|
||||
&& 0 == strncmp (name.b, options[i].name,
|
||||
namelen))
|
||||
{
|
||||
*options[i].variable = strdupdelim (value.b, value.e);
|
||||
break;
|
||||
@ -3102,9 +3104,10 @@ username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", response=\"%s\"",
|
||||
first argument and are followed by whitespace or terminating \0.
|
||||
The comparison is case-insensitive. */
|
||||
#define STARTS(literal, b, e) \
|
||||
((e) - (b) >= STRSIZE (literal) \
|
||||
((e > b) \
|
||||
&& ((size_t) ((e) - (b))) >= STRSIZE (literal) \
|
||||
&& 0 == strncasecmp (b, literal, STRSIZE (literal)) \
|
||||
&& ((e) - (b) == STRSIZE (literal) \
|
||||
&& ((size_t) ((e) - (b)) == STRSIZE (literal) \
|
||||
|| c_isspace (b[STRSIZE (literal)])))
|
||||
|
||||
static bool
|
||||
|
@ -631,7 +631,7 @@ parse_line (const char *line, char **com, char **val, int *comind)
|
||||
static bool
|
||||
setval_internal (int comind, const char *com, const char *val)
|
||||
{
|
||||
assert (0 <= comind && comind < countof (commands));
|
||||
assert (0 <= comind && ((size_t) comind) < countof (commands));
|
||||
DEBUGP (("Setting %s (%s) to %s\n", com, commands[comind].name, val));
|
||||
return commands[comind].action (com, val, commands[comind].place);
|
||||
}
|
||||
|
@ -762,7 +762,7 @@ escnonprint_uri (const char *str)
|
||||
void
|
||||
log_cleanup (void)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < countof (ring); i++)
|
||||
xfree_null (ring[i].buffer);
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ static void
|
||||
init_switches (void)
|
||||
{
|
||||
char *p = short_options;
|
||||
int i, o = 0;
|
||||
size_t i, o = 0;
|
||||
for (i = 0; i < countof (option_data); i++)
|
||||
{
|
||||
struct cmdline_option *opt = &option_data[i];
|
||||
@ -640,7 +640,7 @@ Recursive accept/reject:\n"),
|
||||
N_("Mail bug reports and suggestions to <bug-wget@gnu.org>.\n")
|
||||
};
|
||||
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
printf (_("GNU Wget %s, a non-interactive network retriever.\n"),
|
||||
version_string);
|
||||
|
@ -93,10 +93,10 @@ static int current_impl_locked;
|
||||
bool
|
||||
valid_progress_implementation_p (const char *name)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
struct progress_implementation *pi = implementations;
|
||||
char *colon = strchr (name, ':');
|
||||
int namelen = colon ? colon - name : strlen (name);
|
||||
size_t namelen = colon ? (size_t) (colon - name) : strlen (name);
|
||||
|
||||
for (i = 0; i < countof (implementations); i++, pi++)
|
||||
if (!strncmp (pi->name, name, namelen))
|
||||
@ -109,7 +109,7 @@ valid_progress_implementation_p (const char *name)
|
||||
void
|
||||
set_progress_implementation (const char *name)
|
||||
{
|
||||
int i, namelen;
|
||||
size_t i, namelen;
|
||||
struct progress_implementation *pi = implementations;
|
||||
const char *colon;
|
||||
|
||||
@ -117,7 +117,7 @@ set_progress_implementation (const char *name)
|
||||
name = DEFAULT_PROGRESS_IMPLEMENTATION;
|
||||
|
||||
colon = strchr (name, ':');
|
||||
namelen = colon ? colon - name : strlen (name);
|
||||
namelen = colon ? (size_t) (colon - name) : strlen (name);
|
||||
|
||||
for (i = 0; i < countof (implementations); i++, pi++)
|
||||
if (!strncmp (pi->name, name, namelen))
|
||||
|
@ -133,7 +133,7 @@ posix_init (void)
|
||||
#endif
|
||||
{ CLOCK_REALTIME, NO_SYSCONF_CHECK },
|
||||
};
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
/* Determine the clock we can use. For a clock to be usable, it
|
||||
must be confirmed with sysconf (where applicable) and with
|
||||
|
@ -85,7 +85,7 @@ print_broken_links (void)
|
||||
for (hash_table_iterate (nonexisting_urls_set, &iter);
|
||||
hash_table_iter_next (&iter); )
|
||||
{
|
||||
struct url_list *list;
|
||||
/* Struct url_list *list; */
|
||||
const char *url = (const char *) iter.key;
|
||||
|
||||
logprintf (LOG_NOTQUIET, _("%s\n"), url);
|
||||
|
@ -889,7 +889,7 @@ url_parse (const char *url, int *error)
|
||||
const char *
|
||||
url_error (int error_code)
|
||||
{
|
||||
assert (error_code >= 0 && error_code < countof (parse_errors));
|
||||
assert (error_code >= 0 && ((size_t) error_code) < countof (parse_errors));
|
||||
return _(parse_errors[error_code]);
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ concat_strings (const char *str0, ...)
|
||||
|
||||
const char *next_str;
|
||||
int total_length = 0;
|
||||
int argcount;
|
||||
size_t argcount;
|
||||
|
||||
/* Calculate the length of and allocate the resulting string. */
|
||||
|
||||
@ -1386,7 +1386,7 @@ human_readable (HR_NUMTYPE n)
|
||||
'E', /* exabyte, 2^60 bytes */
|
||||
};
|
||||
static char buf[8];
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
/* If the quantity is smaller than 1K, just print it. */
|
||||
if (n < 1024)
|
||||
|
Loading…
Reference in New Issue
Block a user