|
|
5137f5 |
From 5075166d63aaa9d8c6f441d6073a72b24431408b Mon Sep 17 00:00:00 2001
|
|
|
5137f5 |
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
|
5137f5 |
Date: Wed, 22 Jan 2014 14:29:05 +0100
|
|
|
5137f5 |
Subject: [PATCH 1/3] Properly initialize all used variables
|
|
|
5137f5 |
|
|
|
5137f5 |
---
|
|
|
5137f5 |
src/udiskslinuxblock.c | 8 ++++----
|
|
|
5137f5 |
src/udiskslinuxdriveata.c | 2 +-
|
|
|
5137f5 |
src/udiskslinuxfilesystem.c | 2 +-
|
|
|
5137f5 |
src/udisksstate.c | 2 +-
|
|
|
5137f5 |
tools/udisksctl.c | 1 +
|
|
|
5137f5 |
5 files changed, 8 insertions(+), 7 deletions(-)
|
|
|
5137f5 |
|
|
|
5137f5 |
diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
|
|
|
5137f5 |
index 22bcfd0..c72dded 100644
|
|
|
5137f5 |
--- a/src/udiskslinuxblock.c
|
|
|
5137f5 |
+++ b/src/udiskslinuxblock.c
|
|
|
5137f5 |
@@ -1521,7 +1521,7 @@ handle_add_configuration_item (UDisksBlock *_block,
|
|
|
5137f5 |
UDisksLinuxBlockObject *object;
|
|
|
5137f5 |
UDisksDaemon *daemon;
|
|
|
5137f5 |
const gchar *type;
|
|
|
5137f5 |
- GVariant *details;
|
|
|
5137f5 |
+ GVariant *details = NULL;
|
|
|
5137f5 |
GError *error;
|
|
|
5137f5 |
|
|
|
5137f5 |
error = NULL;
|
|
|
5137f5 |
@@ -1598,7 +1598,7 @@ handle_remove_configuration_item (UDisksBlock *_block,
|
|
|
5137f5 |
UDisksLinuxBlockObject *object;
|
|
|
5137f5 |
UDisksDaemon *daemon;
|
|
|
5137f5 |
const gchar *type;
|
|
|
5137f5 |
- GVariant *details;
|
|
|
5137f5 |
+ GVariant *details = NULL;
|
|
|
5137f5 |
GError *error;
|
|
|
5137f5 |
|
|
|
5137f5 |
error = NULL;
|
|
|
5137f5 |
@@ -1677,8 +1677,8 @@ handle_update_configuration_item (UDisksBlock *_block,
|
|
|
5137f5 |
UDisksDaemon *daemon;
|
|
|
5137f5 |
const gchar *old_type;
|
|
|
5137f5 |
const gchar *new_type;
|
|
|
5137f5 |
- GVariant *old_details;
|
|
|
5137f5 |
- GVariant *new_details;
|
|
|
5137f5 |
+ GVariant *old_details = NULL;
|
|
|
5137f5 |
+ GVariant *new_details = NULL;
|
|
|
5137f5 |
GError *error;
|
|
|
5137f5 |
|
|
|
5137f5 |
error = NULL;
|
|
|
5137f5 |
diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c
|
|
|
5137f5 |
index 534ef4d..5c36078 100644
|
|
|
5137f5 |
--- a/src/udiskslinuxdriveata.c
|
|
|
5137f5 |
+++ b/src/udiskslinuxdriveata.c
|
|
|
5137f5 |
@@ -637,7 +637,7 @@ udisks_linux_drive_ata_smart_selftest_sync (UDisksLinuxDriveAta *drive,
|
|
|
5137f5 |
GError **error)
|
|
|
5137f5 |
{
|
|
|
5137f5 |
UDisksLinuxDriveObject *object;
|
|
|
5137f5 |
- UDisksLinuxDevice *device;
|
|
|
5137f5 |
+ UDisksLinuxDevice *device = NULL;
|
|
|
5137f5 |
SkDisk *d = NULL;
|
|
|
5137f5 |
gboolean ret = FALSE;
|
|
|
5137f5 |
SkSmartSelfTest test;
|
|
|
5137f5 |
diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
|
|
|
5137f5 |
index f243046..4503b51 100644
|
|
|
5137f5 |
--- a/src/udiskslinuxfilesystem.c
|
|
|
5137f5 |
+++ b/src/udiskslinuxfilesystem.c
|
|
|
5137f5 |
@@ -1558,7 +1558,7 @@ handle_unmount (UDisksFilesystem *filesystem,
|
|
|
5137f5 |
GError *error;
|
|
|
5137f5 |
uid_t mounted_by_uid;
|
|
|
5137f5 |
uid_t caller_uid;
|
|
|
5137f5 |
- gint status;
|
|
|
5137f5 |
+ gint status = 0;
|
|
|
5137f5 |
gchar *error_message;
|
|
|
5137f5 |
const gchar *const *mount_points;
|
|
|
5137f5 |
gboolean opt_force;
|
|
|
5137f5 |
diff --git a/src/udisksstate.c b/src/udisksstate.c
|
|
|
5137f5 |
index e7b549a..4dfe393 100644
|
|
|
5137f5 |
--- a/src/udisksstate.c
|
|
|
5137f5 |
+++ b/src/udisksstate.c
|
|
|
5137f5 |
@@ -530,7 +530,7 @@ udisks_state_check_mounted_fs_entry (UDisksState *state,
|
|
|
5137f5 |
const gchar *mount_point;
|
|
|
5137f5 |
GVariant *details;
|
|
|
5137f5 |
GVariant *block_device_value;
|
|
|
5137f5 |
- dev_t block_device;
|
|
|
5137f5 |
+ dev_t block_device = 0;
|
|
|
5137f5 |
GVariant *fstab_mount_value;
|
|
|
5137f5 |
gboolean fstab_mount;
|
|
|
5137f5 |
gboolean keep;
|
|
|
5137f5 |
diff --git a/tools/udisksctl.c b/tools/udisksctl.c
|
|
|
5137f5 |
index 209c0a3..bb1182c 100644
|
|
|
5137f5 |
--- a/tools/udisksctl.c
|
|
|
5137f5 |
+++ b/tools/udisksctl.c
|
|
|
5137f5 |
@@ -890,6 +890,7 @@ read_passphrase (void)
|
|
|
5137f5 |
gchar *ret;
|
|
|
5137f5 |
|
|
|
5137f5 |
ret = NULL;
|
|
|
5137f5 |
+ str = NULL;
|
|
|
5137f5 |
|
|
|
5137f5 |
tty_name = ctermid (NULL);
|
|
|
5137f5 |
if (tty_name == NULL)
|
|
|
5137f5 |
--
|
|
|
5137f5 |
1.8.1.5
|
|
|
5137f5 |
|