diff options
author | David Zeuthen <davidz@redhat.com> | 2011-08-17 09:43:52 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2011-08-17 09:43:52 -0400 |
commit | 37c81f78ad2082d044bf62b6c3389cba3214c008 (patch) | |
tree | 74b47473fe1f7de333ce4815a6e1572cb1631414 | |
parent | 26c65488cd7f893a836b6be0b8a4609ec3c02e14 (diff) |
Fix use of unitialized variables discovered when building with -O2
Gah
Signed-off-by: David Zeuthen <davidz@redhat.com>
-rw-r--r-- | src/udiskslinuxdriveobject.c | 2 | ||||
-rw-r--r-- | tools/udisksctl.c | 6 | ||||
-rw-r--r-- | udisks/udisksclient.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/udiskslinuxdriveobject.c b/src/udiskslinuxdriveobject.c index 29e9520..f60fa29 100644 --- a/src/udiskslinuxdriveobject.c +++ b/src/udiskslinuxdriveobject.c @@ -399,7 +399,7 @@ GUdevDevice * udisks_linux_drive_object_get_device (UDisksLinuxDriveObject *object, gboolean get_hw) { - GUdevDevice *ret; + GUdevDevice *ret = NULL; /* TODO: actually look at @get_hw */ if (object->devices != NULL) { diff --git a/tools/udisksctl.c b/tools/udisksctl.c index 7f17a13..4f71a95 100644 --- a/tools/udisksctl.c +++ b/tools/udisksctl.c @@ -1564,10 +1564,10 @@ handle_command_loop (gint *argc, g_print ("%s \n", symlinks[n]); } } + g_list_foreach (objects, (GFunc) g_object_unref, NULL); + g_list_free (objects); + goto out; } - g_list_foreach (objects, (GFunc) g_object_unref, NULL); - g_list_free (objects); - goto out; } /* done with completion */ diff --git a/udisks/udisksclient.c b/udisks/udisksclient.c index ae96576..3f02ae0 100644 --- a/udisks/udisksclient.c +++ b/udisks/udisksclient.c @@ -333,7 +333,7 @@ udisks_client_get_object_manager (UDisksClient *client) UDisksManager * udisks_client_get_manager (UDisksClient *client) { - UDisksManager *ret; + UDisksManager *ret = NULL; GDBusObject *obj; g_return_val_if_fail (UDISKS_IS_CLIENT (client), NULL); |