diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-17 06:49:33 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-07-02 18:42:06 +0200 |
commit | 626e61ab54cd77666976f8c66c705a9012d2984c (patch) | |
tree | 4431dec75cfd87c18978db0c100e3694b087c191 | |
parent | 851b48b8129bcb763447b908b0793b2782987441 (diff) | |
download | sparse-626e61ab54cd77666976f8c66c705a9012d2984c.tar.gz |
options: move on top the definition of warning type enums
This allows to reuse these enums in earlier helpers.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -250,6 +250,12 @@ void die(const char *fmt, ...) static struct token *pre_buffer_begin = NULL; static struct token *pre_buffer_end = NULL; +enum warning_type { + WARNING_OFF, + WARNING_ON, + WARNING_FORCE_OFF +}; + int Waddress = 0; int Waddress_space = 1; int Wbitwise = 1; @@ -523,12 +529,6 @@ static int opt_##NAME(const char *arg, const char *opt, TYPE *ptr, int flag) \ OPT_NUMERIC(ullong, unsigned long long, strtoull) OPT_NUMERIC(uint, unsigned int, strtoul) -enum { - WARNING_OFF, - WARNING_ON, - WARNING_FORCE_OFF -}; - static char **handle_onoff_switch(char *arg, char **next, const struct flag warnings[]) { int flag = WARNING_ON; |