*: Comment intentional fallthroughs

Falling through a switch case should be commented so it's clear that
behavior is intentional.
This commit is contained in:
James McCoy
2017-04-20 01:17:42 -04:00
parent d840ff7b70
commit 0ff959329b
6 changed files with 12 additions and 2 deletions

View File

@@ -9596,13 +9596,15 @@ static void f_getcwd(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (from) {
break;
}
case kCdScopeTab: // FALLTHROUGH
// fallthrough
case kCdScopeTab:
assert(tp);
from = tp->tp_localdir;
if (from) {
break;
}
case kCdScopeGlobal: // FALLTHROUGH
// fallthrough
case kCdScopeGlobal:
if (globaldir) { // `globaldir` is not always set.
from = globaldir;
} else if (os_dirname(cwd, MAXPATHL) == FAIL) { // Get the OS CWD.