summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2022-09-09 12:27:45 +0100
committerRichard Hughes <richard@hughsie.com>2022-09-09 13:16:21 +0100
commitd68f8a1384b289a1e4cc5094f9a30ef874d972de (patch)
tree98ad143b56d04e001ad7333b7d536fbfa6f641c6
parent0987d6e8b9780893b1736b5e63c6e6703ece0c89 (diff)
downloadgusb-d68f8a1384b289a1e4cc5094f9a30ef874d972de.tar.gz
trivial: Fix two -Wunused-variable warnings
-rw-r--r--gusb/gusb-context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gusb/gusb-context.c b/gusb/gusb-context.c
index 73b6cfd..5d1fea8 100644
--- a/gusb/gusb-context.c
+++ b/gusb/gusb-context.c
@@ -462,6 +462,8 @@ g_usb_context_idle_hotplug_cb(gpointer user_data)
GUsbContextPrivate *priv = GET_PRIVATE(self);
g_autoptr(GMutexLocker) locker = g_mutex_locker_new(&priv->idle_events_mutex);
+ g_assert(locker != NULL);
+
for (guint i = 0; i < priv->idle_events->len; i++) {
GUsbContextIdleHelper *helper = g_ptr_array_index(priv->idle_events, i);
switch (helper->event) {
@@ -494,6 +496,8 @@ g_usb_context_hotplug_cb(struct libusb_context *ctx,
GUsbContextPrivate *priv = GET_PRIVATE(self);
g_autoptr(GMutexLocker) locker = g_mutex_locker_new(&priv->idle_events_mutex);
+ g_assert(locker != NULL);
+
helper = g_new0(GUsbContextIdleHelper, 1);
helper->self = g_object_ref(self);
helper->dev = libusb_ref_device(dev);