diff options
author | cperciva <cperciva@FreeBSD.org> | 2008-08-04 01:25:48 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2008-08-04 01:25:48 +0000 |
commit | 45f0d08992efea87dbc15433e392afdeabec2270 (patch) | |
tree | 229041eea5ad591ae2c140ea64950ea8a82735f1 /usr.bin/lex/flex.skl | |
parent | a5c1d60642f3e26278563bd545199cd3f6d6e962 (diff) | |
download | FreeBSD-src-45f0d08992efea87dbc15433e392afdeabec2270.zip FreeBSD-src-45f0d08992efea87dbc15433e392afdeabec2270.tar.gz |
Mark functions as __dead2 in order to help the LLVM static checker
understand which code paths aren't possible.
This commit eliminates 117 false positive bug reports of the form
"allocate memory; error out if pointer is NULL; use pointer".
Diffstat (limited to 'usr.bin/lex/flex.skl')
-rw-r--r-- | usr.bin/lex/flex.skl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl index d741652..460b2fa 100644 --- a/usr.bin/lex/flex.skl +++ b/usr.bin/lex/flex.skl @@ -9,6 +9,7 @@ #include <sys/cdefs.h> #else #define __unused +#define __dead2 #endif #define FLEX_SCANNER @@ -290,7 +291,7 @@ static void yy_flex_free YY_PROTO(( void * )); static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )) __dead2; %* /* Done after the current pattern has been matched and before the |