Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cfg/windows.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13345,9 +13345,9 @@ HFONT CreateFont(
<define name="MiniDumpWithAvxXStateContext" value="0x0200000"/>
<define name="MiniDumpWithIptTrace" value="0x0400000"/>
<define name="MiniDumpValidTypeFlags" value="0x0800000"/>
<define name="MAKEINTRESOURCEA(i)" value="i"/>
<define name="MAKEINTRESOURCEW(i)" value="i"/>
<define name="MAKEINTRESOURCE(i)" value="i"/>
<define name="MAKEINTRESOURCEA(i)" value="((LPSTR)((ULONG_PTR)((WORD)(i))))"/>
<define name="MAKEINTRESOURCEW(i)" value="((LPWSTR)((ULONG_PTR)((WORD)(i))))"/>
<define name="MAKEINTRESOURCE(i)" value="((LPTSTR)((ULONG_PTR)((WORD)(i))))"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious. why are there 3 casts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but this is the original definition. Maybe to avoid warnings like -Wint-to-void-pointer-cast, since WORD is only 16 bits.

<define name="FILE_ATTRIBUTE_ARCHIVE" value="0x20"/>
<define name="FILE_ATTRIBUTE_COMPRESSED" value="0x800"/>
<define name="FILE_ATTRIBUTE_DEVICE" value="0x40"/>
Expand Down
4 changes: 4 additions & 0 deletions test/cfg/windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ std::string constVariable_GetModuleFileName(void) {
return std::string{path};
}

const TCHAR* constVariable_MAKEINTRESOURCE() { // #14564
return MAKEINTRESOURCE(5 - 1);
}

int stringCompare_mbscmp(const unsigned char *string1, const unsigned char *string2)
{
// cppcheck-suppress stringCompare
Expand Down
Loading