chiark / gitweb /
libudev: silent gcc warning: may be used uninitialized in this function
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 6 Aug 2009 13:37:55 +0000 (15:37 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 6 Aug 2009 13:37:55 +0000 (15:37 +0200)
libudev/libudev-enumerate.c

index 986c1fc..e30a406 100644 (file)
@@ -251,7 +251,6 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude
                unsigned int i;
                unsigned int max;
                struct syspath *prev = NULL, *move_later = NULL;
-               size_t move_later_prefix;
 
                udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list);
                qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp);
@@ -259,6 +258,7 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude
                max = udev_enumerate->devices_cur;
                for (i = 0; i < max; i++) {
                        struct syspath *entry = &udev_enumerate->devices[i];
+                       size_t move_later_prefix = 0;
 
                        /* skip duplicated entries */
                        if (prev != NULL &&