*: Use __attribute__((fallthrough)) where comments aren't supported

Although GCC now detects possibly unintentional fall through, there
rules around which the comments are detected are rather strict.  In
cases where a comment isn't detected, upstream [recommends] using their
fallthrough attribute.

[recommends]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817#c11
This commit is contained in:
James McCoy
2017-05-03 00:08:10 -04:00
parent b43a3dbff8
commit 5ec72aadbf
3 changed files with 20 additions and 2 deletions

View File

@@ -1869,7 +1869,7 @@ void tv_free(typval_T *tv)
}
case VAR_FUNC: {
func_unref(tv->vval.v_string);
// FALLTHROUGH
FALLTHROUGH;
}
case VAR_STRING: {
xfree(tv->vval.v_string);