path: root/extensions
diff options
authorStephan Bergmann <>2020-03-20 15:28:44 +0100
committerStephan Bergmann <>2020-03-20 19:14:43 +0100
commit3ca8fe5c0d51e6728dae949a143e63291d7043bc (patch)
tree1935be0813aaf939c13d31c42a779ca336868764 /extensions
parent337049d4642be4349dd8af3021e05165572d0bfa (diff)
Fix passing RT_RCDATA into FindResourceW
RT_RCDATA is defined as MAKEINTRESOURCE(10) in WinUser.h, and MAKEINTRESOURCE is defined as MAKEINTRESOURCEA in WinUser.h absent a definition of UNICODE. 649854544e28f388774492f27eb1b75485202148 "WinAPI: Fix some leftovers having UNICODE-define-dependency" had changed this > - HRSRC hrc = FindResourceW(g_hModule, L"#2000", RT_RCDATA); > + HRSRC hrc = FindResourceW(g_hModule, L"#2000", MAKEINTRESOURCEW(RT_RCDATA)); before 558956dc811a1f0f07411e348f7081a467bbc3b5 "Drop UNICODE/_UNICODE defines" dropped defining UNICODE. But that change was technically wrong, as now flagged by LLVM 10 trunk clang-cl: > C:/lo-clang/core/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx(50,56): error: cast to smaller integer type 'unsigned short' from 'char *' [-Werror,-Wpointer-to-int-cast] > HRSRC hrc = FindResourceW(g_hModule, L"#2000", MAKEINTRESOURCEW(RT_RCDATA)); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/um\winuser.h(236,51): note: expanded from macro 'MAKEINTRESOURCEW' > #define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i)))) > ^~~~~~~~~ There appears to be no explicit define for MAKEINTRESOURCEW(10), and the fix presented here seems like a cleaner way than replacing the use of RC_RCDATA with MAKEINTRESOURCEW(10). Change-Id: I36f60a8647ac264085656fc9ec3b129c2d81f480 Reviewed-on: Reviewed-by: Mike Kaganski <> Reviewed-by: Stephan Bergmann <> Tested-by: Jenkins
Diffstat (limited to 'extensions')
0 files changed, 0 insertions, 0 deletions