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?
22.03.2016, 22:39, "Nikolay Sivov" bunglehead@gmail.com:
Duplicate UUID is not a warning 2368, it's an error 2270. Could you share a minimal idl you're using to test that?
Calling midl on dlls/oleaut32/tests/test_tlb.idl produces this output: "midl\oleaut32.dll : warning MIDL2368 : error generating type library, ignored : Could not set UUID : nn (0x800288C6)". Adding "midl_pragma warning(disable: 2368)" in file suppress such output.
-- Regards, Bolotov Sergei
On 23.03.2016 1:16, Sergei Bolotov wrote:
22.03.2016, 22:39, "Nikolay Sivov" bunglehead@gmail.com:
Duplicate UUID is not a warning 2368, it's an error 2270. Could you share a minimal idl you're using to test that?
Calling midl on dlls/oleaut32/tests/test_tlb.idl produces this output: "midl\oleaut32.dll : warning MIDL2368 : error generating type library, ignored : Could not set UUID : nn (0x800288C6)". Adding "midl_pragma warning(disable: 2368)" in file suppress such output.
Why do we care about midl output? And even if there is a reason to, parser support to ignore pragma is enough, so you don't need to actually support warnings in widl. Is pedantic mode ever enabled explicitly when building wine?
-- Regards, Bolotov Sergei
23.03.2016, 07:25, "Nikolay Sivov" bunglehead@gmail.com:
On 23.03.2016 1:16, Sergei Bolotov wrote:
22.03.2016, 22:39, "Nikolay Sivov" bunglehead@gmail.com:
Duplicate UUID is not a warning 2368, it's an error 2270. Could you share a minimal idl you're using to test that?
Calling midl on dlls/oleaut32/tests/test_tlb.idl produces this output: "midl\oleaut32.dll : warning MIDL2368 : error generating type library, ignored : Could not set UUID : nn (0x800288C6)". Adding "midl_pragma warning(disable: 2368)" in file suppress such output.
Why do we care about midl output? And even if there is a reason to, parser support to ignore pragma is enough, so you don't need to actually support warnings in widl. Is pedantic mode ever enabled explicitly when building wine?
As Alexandre mentioned in here: https://www.winehq.org/pipermail/wine-devel/2015-November/110224.html the correct way to suppress such warnings would be to implement support for midl_pragma warning(disable). -- Regards, Bolotov Sergei