summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-04-28 10:28:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-04-28 13:36:37 +0200
commit898a74af8270547d35504ce478613787530eba6a (patch)
tree43ff3bd0a2ea2c9e55fd7f7ae1819a8199e06f57
parentb73c6c8e53cf944848cdb3a79371703de99a8710 (diff)
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@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3hudawareness.cxx4
1 files changed, 2 insertions, 2 deletions
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;