From b3900f1fbd5b01d959736fa30fa165afc73ca135 Mon Sep 17 00:00:00 2001 From: hniksic Date: Wed, 6 Jul 2005 18:08:52 -0700 Subject: [PATCH] [svn] In for loops with empty body, put the ";" on a separate line to silence a warning from DMC. --- src/ftp-basic.c | 6 ++++-- src/ftp-ls.c | 9 ++++++--- src/init.c | 3 ++- src/snprintf.c | 3 ++- src/utils.c | 12 ++++++++---- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/ftp-basic.c b/src/ftp-basic.c index b992d19c..753566ae 100644 --- a/src/ftp-basic.c +++ b/src/ftp-basic.c @@ -526,7 +526,8 @@ ftp_pasv (int csock, ip_address *addr, int *port) } /* Parse the request. */ s = respline; - for (s += 4; *s && !ISDIGIT (*s); s++); + for (s += 4; *s && !ISDIGIT (*s); s++) + ; if (!*s) return FTPINVPASV; for (i = 0; i < 6; i++) @@ -594,7 +595,8 @@ ftp_lpsv (int csock, ip_address *addr, int *port) /* Parse the response. */ s = respline; - for (s += 4; *s && !ISDIGIT (*s); s++); + for (s += 4; *s && !ISDIGIT (*s); s++) + ; if (!*s) return FTPINVPASV; diff --git a/src/ftp-ls.c b/src/ftp-ls.c index 93bdf79f..ce17f450 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -642,7 +642,8 @@ ftp_parse_vms_ls (const char *file) tok = strtok(line, " "); if (tok == NULL) tok = line; DEBUGP(("file name: '%s'\n", tok)); - for (p = tok ; *p && *p != ';' ; p++); + for (p = tok ; *p && *p != ';' ; p++) + ; if (*p == ';') *p = '\0'; p = tok + strlen(tok) - 4; if (!strcmp(p, ".DIR")) *p = '\0'; @@ -724,10 +725,12 @@ ftp_parse_vms_ls (const char *file) min = sec = 0; p = tok; hour = atoi (p); - for (; *p && *p != ':'; ++p); + for (; *p && *p != ':'; ++p) + ; if (*p) min = atoi (++p); - for (; *p && *p != ':'; ++p); + for (; *p && *p != ':'; ++p) + ; if (*p) sec = atoi (++p); diff --git a/src/init.c b/src/init.c index faffc44c..d2e41a94 100644 --- a/src/init.c +++ b/src/init.c @@ -1389,7 +1389,8 @@ check_user_specified_header (const char *s) { 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 non-whitespace character. */ if (*p != ':' || p == s) diff --git a/src/snprintf.c b/src/snprintf.c index b8e28f54..a6835076 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -485,7 +485,8 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen, else /* When precision is specified, don't read VALUE past precision. */ /*strln = strnlen (value, max);*/ - for (strln = 0; strln < max && value[strln]; ++strln); + for (strln = 0; strln < max && value[strln]; ++strln) + ; padlen = min - strln; if (padlen < 0) padlen = 0; diff --git a/src/utils.c b/src/utils.c index 6c94d710..29262c12 100644 --- a/src/utils.c +++ b/src/utils.c @@ -670,9 +670,11 @@ bool frontcmp (const char *s1, const char *s2) { if (!opt.ignore_case) - for (; *s1 && *s2 && (*s1 == *s2); ++s1, ++s2); + for (; *s1 && *s2 && (*s1 == *s2); ++s1, ++s2) + ; else - for (; *s1 && *s2 && (TOLOWER (*s1) == TOLOWER (*s2)); ++s1, ++s2); + for (; *s1 && *s2 && (TOLOWER (*s1) == TOLOWER (*s2)); ++s1, ++s2) + ; return *s1 == '\0'; } @@ -1084,9 +1086,11 @@ merge_vecs (char **v1, char **v2) return v1; } /* Count v1. */ - for (i = 0; v1[i]; i++); + for (i = 0; v1[i]; i++) + ; /* Count v2. */ - for (j = 0; v2[j]; j++); + for (j = 0; v2[j]; j++) + ; /* Reallocate v1. */ v1 = xrealloc (v1, (i + j + 1) * sizeof (char **)); memcpy (v1 + i, v2, (j + 1) * sizeof (char *)); -- 2.39.2