Add comments to intentional switch fallthroughs

Clarify Coverity "Missing break in switch" messages.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-11-24 10:51:32 +01:00
parent 40668dcc7c
commit 5d09711b1d
3 changed files with 7 additions and 0 deletions

View file

@ -617,6 +617,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
{
case ERROR_NO_DATA:
err = ERROR_IO_DEVICE;
/*FALLTHRU*/
default:
__seterrno_from_win_error (err);
}

View file

@ -1357,8 +1357,10 @@ wait_sig (VOID *)
sig_clear (-pack.si.si_signo);
else
sigq.add (pack);
/*FALLTHRU*/
case __SIGNOHOLD:
sig_held = false;
/*FALLTHRU*/
case __SIGFLUSH:
case __SIGFLUSHFAST:
if (!sig_held)

View file

@ -169,6 +169,7 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
pad = '0';
continue;
}
/*FALLTHRU*/
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
len = len * 10 + (c - '0');
@ -284,6 +285,7 @@ gen_decimalLL:
n = strtol (fmt, (char **) &fmt, 10);
if (*fmt++ != 's')
goto endfor;
/*FALLTHRU*/
case 's':
s = va_arg (ap, char *);
if (s == NULL)
@ -511,6 +513,7 @@ __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap)
pad = L'0';
continue;
}
/*FALLTHRU*/
case L'1' ... L'9':
len = len * 10 + (c - L'0');
continue;
@ -612,6 +615,7 @@ gen_decimalLL:
n = wcstoul (fmt, (wchar_t **) &fmt, 10);
if (*fmt++ != L's')
goto endfor;
/*FALLTHRU*/
case L's':
s = va_arg (ap, char *);
if (s == NULL)