From 6e64342d34f97db9dcb70426d44c0fb5efec4fc0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 14 Oct 2016 16:46:54 +0200 Subject: clang-cl loplugin: svl The DdeInternal::Cli/SrvCallback functions apparently had broken signatures for 64-bit Windows (32-bit DWORD vs. 64-bit ULONG_PTR parameters), but I assume that was actually harmless, as I think that, for Windows x86-64, those arguments are pushed on the stack right-to-left (regardless of CALLBACK), and they are the last arguments, and SrvCallback doesn't look at them at all, and CliCallback only looks at the lower 32-bit DWORD of the first one (nInfo1). Change-Id: Id77749dd2d29180e2d11b0ae2ad248ac1a7f1bdf Reviewed-on: https://gerrit.libreoffice.org/29848 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- svl/source/config/languageoptions.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'svl/source/config/languageoptions.cxx') diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx index bee71bb4534e..8757244437f7 100644 --- a/svl/source/config/languageoptions.cxx +++ b/svl/source/config/languageoptions.cxx @@ -226,17 +226,17 @@ bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptTyp { bool isInstalled = false; #ifdef _WIN32 - int nLayouts = GetKeyboardLayoutList(0, NULL); + int nLayouts = GetKeyboardLayoutList(0, nullptr); if (nLayouts > 0) { - HKL *lpList = (HKL*)LocalAlloc(LPTR, (nLayouts * sizeof(HKL))); + HKL *lpList = static_cast(LocalAlloc(LPTR, (nLayouts * sizeof(HKL)))); if (lpList) { nLayouts = GetKeyboardLayoutList(nLayouts, lpList); for(int i = 0; i < nLayouts; ++i) { - LCID lang = MAKELCID((WORD)((DWORD_PTR)lpList[i] & 0xffff), SORT_DEFAULT); + LCID lang = MAKELCID((WORD)(reinterpret_cast(lpList[i]) & 0xffff), SORT_DEFAULT); if (MsLangId::getScriptType(lang) == scriptType) { isInstalled = true; -- cgit