Use fallthrough statement attribute (moar)

This commit is contained in:
Nicolas Williams
2022-01-14 16:53:28 -06:00
parent ddc6113610
commit c607135a03
16 changed files with 28 additions and 23 deletions

View File

@@ -129,8 +129,8 @@ rk_fnmatch(const char *pattern, const char *string, int flags)
--pattern;
}
}
fallthrough
/* FALLTHROUGH */
fallthrough
default:
if (c != *string++)
return (FNM_NOMATCH);

View File

@@ -136,8 +136,8 @@ roken_get_homedir(char *home, size_t homesz)
}
return home;
}
fallthrough
/* FALLTHROUGH */
fallthrough
#else
#ifdef HAVE_GETPWNAM_R
size_t buflen = 2048;

View File

@@ -515,8 +515,8 @@ xyzprintf (struct snprintf_state *state, const char *char_format, va_list ap)
}
case '\0' :
--format;
fallthrough
/* FALLTHROUGH */
fallthrough
case '%' :
(*state->append_char)(state, c);
++len;

View File

@@ -377,8 +377,8 @@ strftime (char *buf, size_t maxsize, const char *format,
break;
case '\0' :
--format;
fallthrough
/* FALLTHROUGH */
fallthrough
case '%' :
ret = snprintf (buf, maxsize - n,
"%%");

View File

@@ -424,8 +424,8 @@ strptime (const char *buf, const char *format, struct tm *timeptr)
abort ();
case '\0' :
--format;
fallthrough
/* FALLTHROUGH */
fallthrough
case '%' :
if (*buf == '%')
++buf;