Kaydet (Commit) ec737443 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr,redundantcast (clang-cl)

Change-Id: Ic173e38828b04fd177d62551e3323b816c73d556
Reviewed-on: https://gerrit.libreoffice.org/42980Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f28473dd
...@@ -206,7 +206,7 @@ int32_t WindowsOSVersion() ...@@ -206,7 +206,7 @@ int32_t WindowsOSVersion()
FreeLibrary(hLibrary); FreeLibrary(hLibrary);
if (dwCount != 0 && dwCount < SAL_N_ELEMENTS(szPath)) if (dwCount != 0 && dwCount < SAL_N_ELEMENTS(szPath))
{ {
dwCount = GetFileVersionInfoSizeW(szPath, NULL); dwCount = GetFileVersionInfoSizeW(szPath, nullptr);
if (dwCount != 0) if (dwCount != 0)
{ {
std::unique_ptr<char> ver(new char[dwCount]); std::unique_ptr<char> ver(new char[dwCount]);
...@@ -216,7 +216,7 @@ int32_t WindowsOSVersion() ...@@ -216,7 +216,7 @@ int32_t WindowsOSVersion()
UINT dwBlockSz = 0; UINT dwBlockSz = 0;
if (VerQueryValueW(ver.get(), L"\\", &pBlock, &dwBlockSz) != FALSE && dwBlockSz >= sizeof(VS_FIXEDFILEINFO)) if (VerQueryValueW(ver.get(), L"\\", &pBlock, &dwBlockSz) != FALSE && dwBlockSz >= sizeof(VS_FIXEDFILEINFO))
{ {
VS_FIXEDFILEINFO *vinfo = reinterpret_cast<VS_FIXEDFILEINFO *>(pBlock); VS_FIXEDFILEINFO *vinfo = static_cast<VS_FIXEDFILEINFO *>(pBlock);
winVersion = int32_t(vinfo->dwProductVersionMS); winVersion = int32_t(vinfo->dwProductVersionMS);
} }
} }
......
...@@ -936,7 +936,7 @@ OUString WinSalInstance::getOSVersion() ...@@ -936,7 +936,7 @@ OUString WinSalInstance::getOSVersion()
FreeLibrary(hLibrary); FreeLibrary(hLibrary);
if (dwCount != 0 && dwCount < SAL_N_ELEMENTS(szPath)) if (dwCount != 0 && dwCount < SAL_N_ELEMENTS(szPath))
{ {
dwCount = GetFileVersionInfoSizeW(szPath, NULL); dwCount = GetFileVersionInfoSizeW(szPath, nullptr);
if (dwCount != 0) if (dwCount != 0)
{ {
std::unique_ptr<char> ver(new char[dwCount]); std::unique_ptr<char> ver(new char[dwCount]);
...@@ -946,7 +946,7 @@ OUString WinSalInstance::getOSVersion() ...@@ -946,7 +946,7 @@ OUString WinSalInstance::getOSVersion()
UINT dwBlockSz = 0; UINT dwBlockSz = 0;
if (VerQueryValueW(ver.get(), L"\\", &pBlock, &dwBlockSz) != FALSE && dwBlockSz >= sizeof(VS_FIXEDFILEINFO)) if (VerQueryValueW(ver.get(), L"\\", &pBlock, &dwBlockSz) != FALSE && dwBlockSz >= sizeof(VS_FIXEDFILEINFO))
{ {
VS_FIXEDFILEINFO *vinfo = reinterpret_cast<VS_FIXEDFILEINFO *>(pBlock); VS_FIXEDFILEINFO *vinfo = static_cast<VS_FIXEDFILEINFO *>(pBlock);
OUStringBuffer aVer; OUStringBuffer aVer;
aVer.append("Windows "); aVer.append("Windows ");
aVer.append((sal_Int32)HIWORD(vinfo->dwProductVersionMS)); aVer.append((sal_Int32)HIWORD(vinfo->dwProductVersionMS));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment