diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-02 18:54:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-02 18:54:33 (GMT) |
commit | 5db9effac12d781f179e329ea138fb531a5ae2a0 (patch) | |
tree | 9420cb1fbf2ae5a47f1b4b2d09c13ca582eebf26 /src/gui | |
parent | f16787410dd6eaf48df986644d0c3ac2b021748b (diff) |
Got ride of some uninitialized variable usages.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/core/panels.c | 5 | ||||
-rw-r--r-- | src/gui/menus/edition.c | 2 | ||||
-rw-r--r-- | src/gui/panels/bintree.c | 9 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/gui/core/panels.c b/src/gui/core/panels.c index 4564f86..71aee86 100644 --- a/src/gui/core/panels.c +++ b/src/gui/core/panels.c @@ -181,6 +181,8 @@ bool _browse_all_item_panels(bool skip, handle_panel_item_fc handle, void *data) if (skip) welcome = get_panel_item_by_name(PANEL_WELCOME_ID); + else + welcome = NULL; panels_list_for_each(iter, _panels_list) { @@ -193,8 +195,7 @@ bool _browse_all_item_panels(bool skip, handle_panel_item_fc handle, void *data) } - if (skip) - g_object_unref(G_OBJECT(welcome)); + g_clear_object(&welcome); return result; diff --git a/src/gui/menus/edition.c b/src/gui/menus/edition.c index be045b5..f4b0712 100644 --- a/src/gui/menus/edition.c +++ b/src/gui/menus/edition.c @@ -358,7 +358,7 @@ void update_access_for_cursor_in_menu_edition(GLoadedPanel *panel, const GLineCu if (g_line_cursor_is_valid(cursor)) creator = gtk_display_panel_get_active_object(GTK_DISPLAY_PANEL(panel)); else - cursor = NULL; + creator = NULL; } diff --git a/src/gui/panels/bintree.c b/src/gui/panels/bintree.c index d45fa0b..ffecd6e 100644 --- a/src/gui/panels/bintree.c +++ b/src/gui/panels/bintree.c @@ -134,7 +134,7 @@ static bool populate_tree_with_portion(GBinPortion *, GBinPortion *, BinaryPorti static void reload_portions_for_new_tree_view(const GBintreePanel *, GtkStatusStack *, activity_id_t, bintree_update_data *); /* Met en surbrillance les éléments recherchés dans les noms. */ -static void update_bintree_column_in_tree_view(GtkTreeStore *, GtkTreeIter *, GBinPortion *, gint, const regmatch_t *); +static void update_bintree_column_in_tree_view(GtkTreeStore *, GtkTreeIter *, GBinPortion *, BinaryTreeColumn, const regmatch_t *); @@ -786,7 +786,7 @@ static void reload_portions_for_new_tree_view(const GBintreePanel *panel, GtkSta * * ******************************************************************************/ -static void update_bintree_column_in_tree_view(GtkTreeStore *store, GtkTreeIter *iter, GBinPortion *portion, gint column, const regmatch_t *match) +static void update_bintree_column_in_tree_view(GtkTreeStore *store, GtkTreeIter *iter, GBinPortion *portion, BinaryTreeColumn column, const regmatch_t *match) { const char *content; /* Contenu brut d'origine */ const mrange_t *range; /* Espace de portion à traiter */ @@ -824,6 +824,11 @@ static void update_bintree_column_in_tree_view(GtkTreeStore *store, GtkTreeIter content = hrights; break; + default: + assert(false); + content = NULL; + break; + } value = build_highlighted_name(content, match, 0); |