From: David Zeuthen Date: Thu, 5 Jul 2012 21:07:58 +0000 (-0400) Subject: Fix some uninitialized variable warnings X-Git-Tag: upstream/2.1.2~184 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5207c93dbb17dbc12b47a9db932ce75b55126d50;p=platform%2Fupstream%2Fudisks2.git Fix some uninitialized variable warnings These only occur when building with -O2, not -O0, ofcourse, thanks gcc. Pointed out by Colin Walters . Signed-off-by: David Zeuthen --- diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c index 88f447b..bcc7f18 100644 --- a/src/udiskslinuxdriveata.c +++ b/src/udiskslinuxdriveata.c @@ -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 {