[Libreoffice-commits] core.git: vcl/opengl vcl/win

Stephan Bergmann sbergman at redhat.com
Sun Oct 1 06:58:33 UTC 2017


 vcl/opengl/win/WinDeviceInfo.cxx |    4 ++--
 vcl/win/app/salinst.cxx          |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ec737443c29f50fc9ce9452c58540442c6b34948
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Sep 30 22:48:38 2017 +0200

    loplugin:nullptr,redundantcast (clang-cl)
    
    Change-Id: Ic173e38828b04fd177d62551e3323b816c73d556
    Reviewed-on: https://gerrit.libreoffice.org/42980
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index d885389b0510..841abed10748 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -206,7 +206,7 @@ int32_t WindowsOSVersion()
             FreeLibrary(hLibrary);
             if (dwCount != 0 && dwCount < SAL_N_ELEMENTS(szPath))
             {
-                dwCount = GetFileVersionInfoSizeW(szPath, NULL);
+                dwCount = GetFileVersionInfoSizeW(szPath, nullptr);
                 if (dwCount != 0)
                 {
                     std::unique_ptr<char> ver(new char[dwCount]);
@@ -216,7 +216,7 @@ int32_t WindowsOSVersion()
                         UINT dwBlockSz = 0;
                         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);
                         }
                     }
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index faa5bd3776e4..3cfa96a5b0b4 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -936,7 +936,7 @@ OUString WinSalInstance::getOSVersion()
         FreeLibrary(hLibrary);
         if (dwCount != 0 && dwCount < SAL_N_ELEMENTS(szPath))
         {
-            dwCount = GetFileVersionInfoSizeW(szPath, NULL);
+            dwCount = GetFileVersionInfoSizeW(szPath, nullptr);
             if (dwCount != 0)
             {
                 std::unique_ptr<char> ver(new char[dwCount]);
@@ -946,7 +946,7 @@ OUString WinSalInstance::getOSVersion()
                     UINT dwBlockSz = 0;
                     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;
                         aVer.append("Windows ");
                         aVer.append((sal_Int32)HIWORD(vinfo->dwProductVersionMS));


More information about the Libreoffice-commits mailing list