[tools 2/2] Support for disabling and enabling warnings, handle warning number 2368
Nikolay Sivov
bunglehead at gmail.com
Tue Mar 22 14:39:17 CDT 2016
On 20.03.2016 13:12, Bolotov Sergey wrote:
> diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
> index 8b65ead..137bb2d 100644
> --- a/tools/widl/write_msft.c
> +++ b/tools/widl/write_msft.c
> @@ -51,6 +51,7 @@
> #include "header.h"
> #include "hash.h"
> #include "typetree.h"
> +#include "parser.h"
>
> enum MSFT_segment_index {
> MSFT_SEG_TYPEINFO = 0, /* type information */
> @@ -504,7 +505,7 @@ static int ctl2_alloc_guid(
> offset = ctl2_find_guid(typelib, hash_key, &guid->guid);
> if (offset != -1)
> {
> - if (pedantic)
> + if (is_warning_enabled(2368))
> warning("duplicate uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
> guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
> guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
>
Duplicate UUID is not a warning 2368, it's an error 2270, I don't think
you can suppress it, so we should really abort compilation at this
point. Also if we're doing this, it looks cleaner to have is_warning..()
check within warning(), so you can check there if it's enabled or not,
and it's possible 'pedantic' should take precedence.
Could you share a minimal idl you're using to test that?
More information about the wine-devel
mailing list