Fix some uninitialized variable warnings
authorDavid Zeuthen <zeuthen@gmail.com>
Thu, 5 Jul 2012 21:07:58 +0000 (17:07 -0400)
committerDavid Zeuthen <zeuthen@gmail.com>
Thu, 5 Jul 2012 21:07:58 +0000 (17:07 -0400)
These only occur when building with -O2, not -O0, ofcourse, thanks gcc.

Pointed out by Colin Walters <walters@verbum.org>.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
src/udiskslinuxdriveata.c

index 88f447b..bcc7f18 100644 (file)
@@ -1721,7 +1721,7 @@ static gchar *
 ata_pm_standby_to_string (guint value)
 {
   gchar *ret;
-  gint seconds;
+  gint seconds = -1;
 
   if (value == 0)
     {
@@ -1992,7 +1992,7 @@ udisks_linux_drive_ata_secure_erase_sync (UDisksLinuxDriveAta     *ata,
   UDisksLinuxBlockObject *block_object = NULL;
   UDisksDaemon *daemon;
   GUdevDevice *device = NULL;
-  const gchar *device_file;
+  const gchar *device_file = NULL;
   gint fd = -1;
   union
   {