mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-13 16:54:50 +00:00
src: Add some gpointer casts to eliminate compiler warnings
These introduce no functional changes, but do shut up -Wincompatible-pointer-types-discards-qualifiers warnings. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
8e2ca90509
commit
4fbba6f7c0
@ -1237,7 +1237,7 @@ static gboolean
|
||||
_open_cb (GObject *device, GError **error)
|
||||
{
|
||||
g_assert_cmpstr (g_object_get_data (device, "state"), ==, "closed");
|
||||
g_object_set_data (device, "state", "opened");
|
||||
g_object_set_data (device, "state", (gpointer) "opened");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1245,7 +1245,7 @@ static gboolean
|
||||
_close_cb (GObject *device, GError **error)
|
||||
{
|
||||
g_assert_cmpstr (g_object_get_data (device, "state"), ==, "opened");
|
||||
g_object_set_data (device, "state", "closed-on-unref");
|
||||
g_object_set_data (device, "state", (gpointer) "closed-on-unref");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1256,7 +1256,7 @@ fu_device_locker_func (void)
|
||||
g_autoptr(GError) error = NULL;
|
||||
g_autoptr(GObject) device = g_object_new (G_TYPE_OBJECT, NULL);
|
||||
|
||||
g_object_set_data (device, "state", "closed");
|
||||
g_object_set_data (device, "state", (gpointer) "closed");
|
||||
locker = fu_device_locker_new_full (device, _open_cb, _close_cb, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert_nonnull (locker);
|
||||
|
Loading…
Reference in New Issue
Block a user