1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] In for loops with empty body, put the ";" on a separate line to silence

a warning from DMC.
This commit is contained in:
hniksic 2005-07-06 18:08:52 -07:00
parent a4345ec8d0
commit b3900f1fbd
5 changed files with 22 additions and 11 deletions

View File

@ -526,7 +526,8 @@ ftp_pasv (int csock, ip_address *addr, int *port)
} }
/* Parse the request. */ /* Parse the request. */
s = respline; s = respline;
for (s += 4; *s && !ISDIGIT (*s); s++); for (s += 4; *s && !ISDIGIT (*s); s++)
;
if (!*s) if (!*s)
return FTPINVPASV; return FTPINVPASV;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
@ -594,7 +595,8 @@ ftp_lpsv (int csock, ip_address *addr, int *port)
/* Parse the response. */ /* Parse the response. */
s = respline; s = respline;
for (s += 4; *s && !ISDIGIT (*s); s++); for (s += 4; *s && !ISDIGIT (*s); s++)
;
if (!*s) if (!*s)
return FTPINVPASV; return FTPINVPASV;

View File

@ -642,7 +642,8 @@ ftp_parse_vms_ls (const char *file)
tok = strtok(line, " "); tok = strtok(line, " ");
if (tok == NULL) tok = line; if (tok == NULL) tok = line;
DEBUGP(("file name: '%s'\n", tok)); DEBUGP(("file name: '%s'\n", tok));
for (p = tok ; *p && *p != ';' ; p++); for (p = tok ; *p && *p != ';' ; p++)
;
if (*p == ';') *p = '\0'; if (*p == ';') *p = '\0';
p = tok + strlen(tok) - 4; p = tok + strlen(tok) - 4;
if (!strcmp(p, ".DIR")) *p = '\0'; if (!strcmp(p, ".DIR")) *p = '\0';
@ -724,10 +725,12 @@ ftp_parse_vms_ls (const char *file)
min = sec = 0; min = sec = 0;
p = tok; p = tok;
hour = atoi (p); hour = atoi (p);
for (; *p && *p != ':'; ++p); for (; *p && *p != ':'; ++p)
;
if (*p) if (*p)
min = atoi (++p); min = atoi (++p);
for (; *p && *p != ':'; ++p); for (; *p && *p != ':'; ++p)
;
if (*p) if (*p)
sec = atoi (++p); sec = atoi (++p);

View File

@ -1389,7 +1389,8 @@ check_user_specified_header (const char *s)
{ {
const char *p; const char *p;
for (p = s; *p && *p != ':' && !ISSPACE (*p); p++); for (p = s; *p && *p != ':' && !ISSPACE (*p); p++)
;
/* The header MUST contain `:' preceded by at least one /* The header MUST contain `:' preceded by at least one
non-whitespace character. */ non-whitespace character. */
if (*p != ':' || p == s) if (*p != ':' || p == s)

View File

@ -485,7 +485,8 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen,
else else
/* When precision is specified, don't read VALUE past precision. */ /* When precision is specified, don't read VALUE past precision. */
/*strln = strnlen (value, max);*/ /*strln = strnlen (value, max);*/
for (strln = 0; strln < max && value[strln]; ++strln); for (strln = 0; strln < max && value[strln]; ++strln)
;
padlen = min - strln; padlen = min - strln;
if (padlen < 0) if (padlen < 0)
padlen = 0; padlen = 0;

View File

@ -670,9 +670,11 @@ bool
frontcmp (const char *s1, const char *s2) frontcmp (const char *s1, const char *s2)
{ {
if (!opt.ignore_case) if (!opt.ignore_case)
for (; *s1 && *s2 && (*s1 == *s2); ++s1, ++s2); for (; *s1 && *s2 && (*s1 == *s2); ++s1, ++s2)
;
else else
for (; *s1 && *s2 && (TOLOWER (*s1) == TOLOWER (*s2)); ++s1, ++s2); for (; *s1 && *s2 && (TOLOWER (*s1) == TOLOWER (*s2)); ++s1, ++s2)
;
return *s1 == '\0'; return *s1 == '\0';
} }
@ -1084,9 +1086,11 @@ merge_vecs (char **v1, char **v2)
return v1; return v1;
} }
/* Count v1. */ /* Count v1. */
for (i = 0; v1[i]; i++); for (i = 0; v1[i]; i++)
;
/* Count v2. */ /* Count v2. */
for (j = 0; v2[j]; j++); for (j = 0; v2[j]; j++)
;
/* Reallocate v1. */ /* Reallocate v1. */
v1 = xrealloc (v1, (i + j + 1) * sizeof (char **)); v1 = xrealloc (v1, (i + j + 1) * sizeof (char **));
memcpy (v1 + i, v2, (j + 1) * sizeof (char *)); memcpy (v1 + i, v2, (j + 1) * sizeof (char *));