Use fallthrough statement attribute
This commit is contained in:
@@ -129,6 +129,7 @@ rk_fnmatch(const char *pattern, const char *string, int flags)
|
||||
--pattern;
|
||||
}
|
||||
}
|
||||
fallthrough
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (c != *string++)
|
||||
|
@@ -136,7 +136,8 @@ roken_get_homedir(char *home, size_t homesz)
|
||||
}
|
||||
return home;
|
||||
}
|
||||
/* Fallthru to return NULL */
|
||||
fallthrough
|
||||
/* FALLTHROUGH */
|
||||
#else
|
||||
#ifdef HAVE_GETPWNAM_R
|
||||
size_t buflen = 2048;
|
||||
|
@@ -515,6 +515,7 @@ xyzprintf (struct snprintf_state *state, const char *char_format, va_list ap)
|
||||
}
|
||||
case '\0' :
|
||||
--format;
|
||||
fallthrough
|
||||
/* FALLTHROUGH */
|
||||
case '%' :
|
||||
(*state->append_char)(state, c);
|
||||
|
@@ -377,6 +377,7 @@ strftime (char *buf, size_t maxsize, const char *format,
|
||||
break;
|
||||
case '\0' :
|
||||
--format;
|
||||
fallthrough
|
||||
/* FALLTHROUGH */
|
||||
case '%' :
|
||||
ret = snprintf (buf, maxsize - n,
|
||||
|
@@ -424,6 +424,7 @@ strptime (const char *buf, const char *format, struct tm *timeptr)
|
||||
abort ();
|
||||
case '\0' :
|
||||
--format;
|
||||
fallthrough
|
||||
/* FALLTHROUGH */
|
||||
case '%' :
|
||||
if (*buf == '%')
|
||||
|
Reference in New Issue
Block a user