diff options
author | Richard Hughes <richard@hughsie.com> | 2023-01-23 15:25:03 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2023-01-23 15:25:19 +0000 |
commit | 52f1b23dae6b2700f62ec3bef425ffff9070087c (patch) | |
tree | b4bf831286fbfcd2c927d60bd624214abac11adb | |
parent | 8ba58a2e440acc485ca2ea7003f259376336d36e (diff) | |
download | gusb-52f1b23dae6b2700f62ec3bef425ffff9070087c.tar.gz |
trivial: Fix -Wdeclaration-after-statement
-rw-r--r-- | gusb/gusb-interface.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gusb/gusb-interface.c b/gusb/gusb-interface.c index fc5ccc4..a7385cd 100644 --- a/gusb/gusb-interface.c +++ b/gusb/gusb-interface.c @@ -88,13 +88,12 @@ _g_usb_interface_load(GUsbInterface *self, JsonObject *json_object, GError **err /* array of endpoints */ if (json_object_has_member(json_object, "UsbEndpoints")) { - self->endpoints = g_ptr_array_new_with_free_func(g_object_unref); JsonArray *json_array = json_object_get_array_member(json_object, "UsbEndpoints"); + self->endpoints = g_ptr_array_new_with_free_func(g_object_unref); for (guint i = 0; i < json_array_get_length(json_array); i++) { JsonNode *node_tmp = json_array_get_element(json_array, i); JsonObject *obj_tmp = json_node_get_object(node_tmp); - g_autoptr(GUsbEndpoint) endpoint = - g_object_new(G_USB_TYPE_ENDPOINT, NULL); + g_autoptr(GUsbEndpoint) endpoint = g_object_new(G_USB_TYPE_ENDPOINT, NULL); if (!_g_usb_endpoint_load(endpoint, obj_tmp, error)) return FALSE; g_ptr_array_add(self->endpoints, g_object_ref(endpoint)); |