[gnome-software/wip/mcrha/uninit-vars] trivial: Avoid use of uninitialized variables



commit 74de7b9d92f184e87533b5428ecd1e83f96c56ce
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 8 19:42:51 2021 +0200

    trivial: Avoid use of uninitialized variables
    
    Reported by gcc 11.1.1 20210428 when configured with CFLAGS='-g -O2 -Wall'.

 plugins/fwupd/gs-plugin-fwupd.c | 2 +-
 src/gs-common.c                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index 40156d48e..3ce397cac 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -378,7 +378,7 @@ gs_plugin_fwupd_new_app (GsPlugin *plugin, FwupdDevice *dev, GError **error)
 #if FWUPD_CHECK_VERSION(1,5,6)
        GPtrArray *locations = fwupd_release_get_locations (rel);
 #endif
-       const gchar *update_uri;
+       const gchar *update_uri = NULL;
        g_autofree gchar *basename = NULL;
        g_autofree gchar *filename_cache = NULL;
        g_autoptr(GFile) file = NULL;
diff --git a/src/gs-common.c b/src/gs-common.c
index 984aaab10..cfba8208c 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -683,7 +683,7 @@ gs_utils_reboot_notify (GsAppList *list,
 {
        g_autoptr(GNotification) n = NULL;
        g_autofree gchar *tmp = NULL;
-       const gchar *app_name;
+       const gchar *app_name = NULL;
        const gchar *title;
        const gchar *body;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]