[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 28 11:37:21 UTC 2021


 vcl/unx/gtk3/gtk3hudawareness.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 898a74af8270547d35504ce478613787530eba6a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 28 10:28:20 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Apr 28 13:36:37 2021 +0200

    WaE on g_object_ref case, seen in Fedora 34 with glib2-2.68.1
    
    vcl/unx/gtk3/gtk3hudawareness.cxx:95:24: error: redundant static_cast from 'typename std::remove_reference<decltype(connection)>::type' (aka '_GDBusConnection *') to 'GDBusConnection *' (aka '_GDBusConnection *') [loplugin:redundantcast]
    cast<GDBusConnection*>(g_object_ref (connection));
    vcl/unx/gtk3/gtk3hudawareness.cxx:95:24: error: static_cast from 'typename std::remove_reference<decltype(connection)>::type' (aka '_GDBusConnection *') prvalue to 'GDBusConnection *' (aka '_GDBusConnection *') prvalue is redundant [loplugin:redundantcast]
      handle->connection = static_cast<GDBusConnection*>(g_object_ref (connection));
    
    Change-Id: I7460ea60b22aa50d4bd7b10f2e12980d1f80778e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114772
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3hudawareness.cxx b/vcl/unx/gtk3/gtk3hudawareness.cxx
index dddad28dafb6..be84933249e2 100644
--- a/vcl/unx/gtk3/gtk3hudawareness.cxx
+++ b/vcl/unx/gtk3/gtk3hudawareness.cxx
@@ -15,7 +15,7 @@ namespace {
 
 struct HudAwarenessHandle
 {
-  GDBusConnection *connection;
+  gpointer connection;
   HudAwarenessCallback callback;
   gpointer user_data;
   GDestroyNotify notify;
@@ -92,7 +92,7 @@ hud_awareness_register (GDBusConnection       *connection,
       return 0;
     }
 
-  handle->connection = static_cast<GDBusConnection*>(g_object_ref (connection));
+  handle->connection = g_object_ref(connection);
   handle->callback = callback;
   handle->user_data = user_data;
   handle->notify = notify;


More information about the Libreoffice-commits mailing list