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/yacc | |
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/yacc')
-rw-r--r-- | usr.bin/yacc/defs.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/usr.bin/yacc/defs.h b/usr.bin/yacc/defs.h index cb8b083..5219e1b 100644 --- a/usr.bin/yacc/defs.h +++ b/usr.bin/yacc/defs.h @@ -309,26 +309,26 @@ char *allocate(unsigned); void closure(short *, int); void create_symbol_table(void); void default_action_warning(void); -void dollar_error(int, char *, char *); +void dollar_error(int, char *, char *) __dead2; void dollar_warning(int, int); -void done(int); -void fatal(const char *msg); +void done(int) __dead2; +void fatal(const char *msg) __dead2; void finalize_closure(void); void free_parser(void); void free_symbols(void); void free_symbol_table(void); -void illegal_character(char *); -void illegal_tag(int, char *, char *); +void illegal_character(char *) __dead2; +void illegal_tag(int, char *, char *) __dead2; void lalr(void); bucket *lookup(char *); void lr0(void); bucket *make_bucket(const char *); void make_parser(void); -void no_grammar(void); -void no_space(void); -void open_error(const char *); +void no_grammar(void) __dead2; +void no_space(void) __dead2; +void open_error(const char *) __dead2; void output(void); -void over_unionized(char *); +void over_unionized(char *) __dead2; void prec_redeclared(void); void reader(void); void reflexive_transitive_closure(unsigned *, int); @@ -337,21 +337,21 @@ void restarted_warning(void); void retyped_warning(char *); void revalued_warning(char *); void set_first_derives(void); -void syntax_error(int, char *, char *); -void terminal_lhs(int); -void terminal_start(char *); -void tokenized_start(char *); -void undefined_goal(char *); +void syntax_error(int, char *, char *) __dead2; +void terminal_lhs(int) __dead2; +void terminal_start(char *) __dead2; +void tokenized_start(char *) __dead2; +void undefined_goal(char *) __dead2; void undefined_symbol_warning(char *); -void unexpected_EOF(void); -void unknown_rhs(int); -void unterminated_action(int, char *, char *); -void unterminated_comment(int, char *, char *); -void unterminated_string(int, char *, char *); -void unterminated_text(int, char *, char *); -void unterminated_union(int, char *, char *); -void untyped_lhs(void); -void untyped_rhs(int, char *); -void used_reserved(char *); +void unexpected_EOF(void) __dead2; +void unknown_rhs(int) __dead2; +void unterminated_action(int, char *, char *) __dead2; +void unterminated_comment(int, char *, char *) __dead2; +void unterminated_string(int, char *, char *) __dead2; +void unterminated_text(int, char *, char *) __dead2; +void unterminated_union(int, char *, char *) __dead2; +void untyped_lhs(void) __dead2; +void untyped_rhs(int, char *) __dead2; +void used_reserved(char *) __dead2; void verbose(void); void write_section(const char **); |