widl: Support midl_pragma default option.
Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9e97f3513e
commit
a55a37d1da
|
@ -39,7 +39,7 @@ void pop_import(void);
|
|||
|
||||
int is_type(const char *name);
|
||||
|
||||
int do_warning(char *toggle, warning_list_t *wnum);
|
||||
int do_warning(const char *toggle, warning_list_t *wnum);
|
||||
int is_warning_enabled(int warning);
|
||||
|
||||
extern char *temp_name;
|
||||
|
|
|
@ -645,7 +645,7 @@ static void warning_enable(int warning)
|
|||
}
|
||||
}
|
||||
|
||||
int do_warning(char *toggle, warning_list_t *wnum)
|
||||
int do_warning(const char *toggle, warning_list_t *wnum)
|
||||
{
|
||||
warning_t *warning, *next;
|
||||
int ret = 1;
|
||||
|
@ -658,7 +658,7 @@ int do_warning(char *toggle, warning_list_t *wnum)
|
|||
if(!strcmp(toggle, "disable"))
|
||||
LIST_FOR_EACH_ENTRY(warning, wnum, warning_t, entry)
|
||||
warning_disable(warning->num);
|
||||
else if(!strcmp(toggle, "enable"))
|
||||
else if(!strcmp(toggle, "enable") || !strcmp(toggle, "default"))
|
||||
LIST_FOR_EACH_ENTRY(warning, wnum, warning_t, entry)
|
||||
warning_enable(warning->num);
|
||||
else
|
||||
|
|
|
@ -425,7 +425,12 @@ pragma_warning: tPRAGMA_WARNING '(' aIDENTIFIER ':' warnings ')'
|
|||
$$ = NULL;
|
||||
result = do_warning($3, $5);
|
||||
if(!result)
|
||||
error_loc("expected \"disable\" or \"enable\"\n");
|
||||
error_loc("expected \"disable\", \"enable\" or \"default\"\n");
|
||||
}
|
||||
| tPRAGMA_WARNING '(' tDEFAULT ':' warnings ')'
|
||||
{
|
||||
$$ = NULL;
|
||||
do_warning("default", $5);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in New Issue