[PATCH 3/8] dllhost: Implement ISurrogate::LoadDllServer().

Gabriel Ivăncescu gabrielopcode at gmail.com
Tue Feb 22 11:46:50 CST 2022


On 22/02/2022 17:07, Dmitry Timoshkov wrote:
> Huw Davies <huw at codeweavers.com> wrote:
> 
>> On Tue, Feb 22, 2022 at 05:57:01PM +0300, Dmitry Timoshkov wrote:
>>> Huw Davies <huw at codeweavers.com> wrote:
>>>
>>>> On Tue, Feb 22, 2022 at 05:04:15PM +0300, Dmitry Timoshkov wrote:
>>>>> Dmitry Timoshkov <dmitry at baikal.ru> wrote:
>>>>>
>>>>>>> This is generating a few -Wformat warnings:
>>>>>>>
>>>>>>> In file included from programs/dllhost/dllhost.c:27:
>>>>>>> programs/dllhost/dllhost.c: In function ‘factory_AddRef’:
>>>>>>> programs/dllhost/dllhost.c:81:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘ULONG’ {aka ‘long unsigned int’} [-Wformat=]
>>>>>>>     81 |     TRACE("(%p)->%u\n", iface, ref);
>>>>>>>        |           ^~~~~~~~~~~~         ~~~
>>>>>>>        |                                |
>>>>>>>        |                                ULONG {aka long unsigned int}
>>>>>>>
>>>>>>> Apart from that, the series looks good at first glance.
>>>>>>
>>>>>> I don't get the warnings with clang, will check with a gcc build.
>>>>>
>>>>> I don't see this warning in an ELF build either. This is a default build,
>>>>> nothing custom or special. Is there a trick to enable the warnings?
>>>>
>>>> I'd have thought you'd have seen them in a PE build or in a 32-bit
>>>> ELF build - ie. whenever ULONG is unsigned long.
>>>
>>> No, I don't see these warnings. Moreover, root Makefile contains explicit
>>> -Wno-format in CFLAGS. Replacing -Wno-format by -Wformat changes nothing.
>>> Again, this is default build, with clang or gcc. So, if I missed some of
>>> the warnings at least you know why :)
>>
>> Right, but makedep.c adds -Wformat in the cross case (yes, I was wrong
>> about the 32-bit ELF build).
> 
> As I already mentioned, I don't see the warnings in a clang (PE) build,
> in both 32 and 64-bit build trees. Probably something is misdetected here?
> 

I think this happens on MinGW with GCC 11. It's technically correct, but 
harmless, so I can see why Clang does not complain. That's because long 
== int on Windows model, even on 64-bit (i.e. it's still 32 bits), so %u 
doesn't give a wrong result.



More information about the wine-devel mailing list