[gnome-software] Fix two gcc -Wmaybe-uninitialized warnings
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix two gcc -Wmaybe-uninitialized warnings
- Date: Sat, 24 Oct 2015 06:26:53 +0000 (UTC)
commit a87f2571aef6a44ace22fbb07499b531983e5d89
Author: Kalev Lember <klember redhat com>
Date: Sat Oct 24 08:15:25 2015 +0200
Fix two gcc -Wmaybe-uninitialized warnings
src/gs-shell-details.c | 2 +-
src/plugins/gs-plugin-packagekit-refresh.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index c94b37e..b682ed7 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -670,7 +670,7 @@ gs_shell_details_refresh_all (GsShellDetails *self)
* defined menu category */
gtk_label_set_label (GTK_LABEL (self->label_details_category_value), C_("menu category",
"None"));
} else {
- g_autofree gchar *path;
+ g_autofree gchar *path = NULL;
if (gtk_widget_get_direction (self->label_details_category_value) == GTK_TEXT_DIR_RTL)
path = g_strjoinv (" ← ", menu_path);
else
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index 8acda0d..1eea63e 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -276,8 +276,7 @@ gs_plugin_packagekit_refresh_guess_app_id (GsPlugin *plugin,
fns = pk_files_get_files (item);
for (j = 0; fns[j] != NULL; j++) {
if (g_str_has_suffix (fns[j], ".desktop")) {
- g_autofree gchar *basename;
- basename = g_path_get_basename (fns[j]);
+ g_autofree gchar *basename = g_path_get_basename (fns[j]);
gs_app_set_id (app, basename);
gs_app_set_kind (app, GS_APP_KIND_NORMAL);
gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]