Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Oct 5, 2025

Follow-up to d25b050 #2204

@vszakats vszakats added Windows Windows-specific tidy-up labels Oct 5, 2025
@github-actions github-actions bot added the tests label Oct 5, 2025
@vszakats vszakats changed the title tool_filetime: replace cast with the correct printf mask tool_filetime: replace cast with the fitting printf mask Oct 5, 2025
@vszakats vszakats changed the title tool_filetime: replace cast with the fitting printf mask tool_filetime: replace cast with the fitting printf mask (Windows) Oct 6, 2025
@vszakats vszakats closed this in c93457f Oct 6, 2025
@vszakats vszakats deleted the werrmask branch October 6, 2025 01:27
@jay
Copy link
Member

jay commented Oct 6, 2025

How is this a follow up to a 2018 commit and GetLastError returns a dword so %d or %u should work fine

@vszakats
Copy link
Member Author

vszakats commented Oct 6, 2025

How is this a follow up to a 2018 commit and GetLastError returns a dword so %d or %u should work fine

It's when the unsigned int casts were added. I'm guessing to match the masks?
DWORD is an unsigned long, and in other places the long mask was used for this,
without the cast. Granted, with current archs it doesn't matter much, but it also
makes little sense to do this pattern in subtly different ways IMO.

@jay
Copy link
Member

jay commented Oct 6, 2025

I forgot they did that, I thought it was an unsigned int, DWORD = double word = 16x2 = 32 bits but ok either way works on Windows since long is also 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants