tree-wide: Fix use of potentially uninitialized variables

These were caught by Clang.

Closes: #505
Approved by: jlebon
This commit is contained in:
Colin Walters 2016-10-28 15:54:12 -04:00 committed by Atomic Bot
parent 55593b77c4
commit e4068c5094
2 changed files with 7 additions and 5 deletions

View File

@ -68,9 +68,11 @@ get_active_txn (RPMOSTreeSysroot *sysroot_proxy)
GVariant* txn = rpmostree_sysroot_get_active_transaction (sysroot_proxy);
const char *a, *b, *c;
if (txn)
{
g_variant_get (txn, "(&s&s&s)", &a, &b, &c);
if (*a)
return txn;
}
return NULL;
}
@ -109,7 +111,7 @@ status_generic (RPMOSTreeSysroot *sysroot_proxy,
{
g_autoptr(GVariant) child = g_variant_iter_next_value (&iter);
g_autoptr(GVariantDict) dict = NULL;
const gchar *const*origin_packages;
const gchar *const*origin_packages = NULL;
const gchar *origin_refspec;
const gchar *id;
const gchar *os_name;

View File

@ -518,7 +518,7 @@ rpmostree_transaction_get_response_sync (RPMOSTreeSysroot *sysroot_proxy,
TransactionProgress *tp = transaction_progress_new ();
const char *bus_name;
const char *bus_name = NULL;
gint cancel_handler;
gulong signal_handler = 0;
gboolean success = FALSE;