[Libreoffice-commits] core.git: shell/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 25 19:11:07 UTC 2021


 shell/source/win32/shlxthandler/infotips/infotips.cxx       |    2 +-
 shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7d5346eb09a9e4acc72c646800e77f363fe10e2f
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jun 25 10:25:45 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jun 25 21:10:28 2021 +0200

    -Werror,-Wunused-but-set-parameter (clang-cl 13 trunk)
    
    ...revealing that these places apparently wanted to assign to *pClassID rather
    than pClassID ever since their introduction with
    b718f390bf3dcc85dc97b2ef7483d93bbe3968ec "INTEGRATION: CWS desktintgr01" and
    9b1b1b00818d177ed32f5a3d0e0d1f41b40de926 "INTEGRATION: CWS desktintgr02"
    
    Change-Id: I672684739fd2722c5e804f47790884174c576369
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117840
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index 60343e1a4c0b..af03f4a32faa 100644
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -308,7 +308,7 @@ COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoFlags(DWORD * /*
 
 HRESULT STDMETHODCALLTYPE CInfoTip::GetClassID(CLSID* pClassID)
 {
-    pClassID = const_cast<CLSID*>(&CLSID_INFOTIP_HANDLER);
+    *pClassID = CLSID_INFOTIP_HANDLER;
     return S_OK;
 }
 
diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
index a2ae80dd0daf..ad5cbe03b0e1 100644
--- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
+++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
@@ -470,7 +470,7 @@ HRESULT STDMETHODCALLTYPE CThumbviewer::GetLocation(
 
 HRESULT STDMETHODCALLTYPE CThumbviewer::GetClassID(CLSID* pClassID)
 {
-    pClassID = const_cast<CLSID*>(&CLSID_THUMBVIEWER_HANDLER);
+    *pClassID = CLSID_THUMBVIEWER_HANDLER;
     return S_OK;
 }
 


More information about the Libreoffice-commits mailing list