[PATCH v2 1/4] ws2_32/tests: Use %u and %zu in test_ipv6_cmsg instead of casting

Zebediah Figura (she/her) zfigura at codeweavers.com
Tue Sep 28 16:17:43 CDT 2021


On 9/28/21 16:07, Alex Henrie wrote:
> On Tue, Sep 28, 2021 at 2:04 PM Zebediah Figura (she/her)
> <zfigura at codeweavers.com> wrote:
>>
>> On 9/28/21 15:03, Alex Henrie wrote:
>>> On Tue, Sep 28, 2021 at 1:46 PM Zebediah Figura (she/her)
>>> <zfigura at codeweavers.com> wrote:
>>>>
>>>> Sorry, I suggested %zu, but I get warnings here when actually using it
>>>> with mingw. IIRC only ucrtbase (and recent versions of msvcrt?) actually
>>>> support it anyway, so I guess %Iu is the right solution.
>>>
>>> Wouldn't %lu cause warnings on 64-bit MSVC? %llu should work everywhere though.
>>
>> That's a capital I, not a lowercase L. %Iu is always pointer-sized.
> 
> Interesting, thanks for educating me. I guess I should use a different
> email font :-P Do we still support compiling the Wine tests with
> regular GCC? If so, %I (capital I) isn't going to work. I also just
> tried %llu and it produces similar warnings to %zu.

It works even without cross-compiling, since we're linking to msvcrt 
either way. (Which is, incidentally, why the commit message has always 
been "build with msvcrt" rather than anything like "build in PE format".)

We might generate warnings when not cross-compiling, but I don't know if 
that's worth fixing at this point.



More information about the wine-devel mailing list