diff options
author | rbuj <[email protected]> | 2019-08-31 10:18:53 +0200 |
---|---|---|
committer | Robert Antoni Buj Gelonch <[email protected]> | 2019-09-03 18:08:10 +0200 |
commit | 9bd8ff26b6c038bb6d8509bf999f16dfb5408a88 (patch) | |
tree | 51f1215c99ad67107d6317efb616c2a0ab043851 /src | |
parent | b37773ded4dd15c7591a2e40e4c2e40ba9341c8f (diff) | |
download | engrampa-9bd8ff26b6c038bb6d8509bf999f16dfb5408a88.tar.bz2 engrampa-9bd8ff26b6c038bb6d8509bf999f16dfb5408a88.tar.xz |
remove build warning: local variable shadows another variable
actions.c:245:24: warning: declaration of ‘dialog’ shadows a previous local [-Wshadow]
caja-engrampa.c:137:17: warning: declaration of ‘file’ shadows a previous local [-Wshadow]
caja-engrampa.c:58:17: warning: declaration of ‘file’ shadows a previous local [-Wshadow]
dlg-add-files.c:120:9: warning: declaration of ‘uri’ shadows a previous local [-Wshadow]
fr-window.c:4935:11: warning: declaration of ‘value’ shadows a previous local [-Wshadow]
Diffstat (limited to 'src')
-rw-r--r-- | src/actions.c | 2 | ||||
-rw-r--r-- | src/dlg-add-files.c | 6 | ||||
-rw-r--r-- | src/fr-window.c | 10 |
3 files changed, 8 insertions, 10 deletions
diff --git a/src/actions.c b/src/actions.c index cad7a7a..bbb88f1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -224,9 +224,9 @@ get_archive_filename_from_selector (DlgNewData *data) debug (DEBUG_INFO, "create/save %s\n", uri); if (uri_exists (uri)) { - GtkWidget *dialog; if (! is_supported_extension (data->dialog, uri, data->supported_types)) { + GtkWidget *dialog; dialog = _gtk_error_dialog_new (GTK_WINDOW (data->dialog), GTK_DIALOG_MODAL, NULL, diff --git a/src/dlg-add-files.c b/src/dlg-add-files.c index 49b0382..fed6ed8 100644 --- a/src/dlg-add-files.c +++ b/src/dlg-add-files.c @@ -116,10 +116,8 @@ file_sel_response_cb (GtkWidget *widget, /**/ selections = gtk_file_chooser_get_uris (file_sel); - for (iter = selections; iter != NULL; iter = iter->next) { - char *uri = iter->data; - item_list = g_list_prepend (item_list, g_file_new_for_uri (uri)); - } + for (iter = selections; iter != NULL; iter = iter->next) + item_list = g_list_prepend (item_list, g_file_new_for_uri (iter->data)); if (item_list != NULL) fr_window_archive_add_files (window, item_list, update); diff --git a/src/fr-window.c b/src/fr-window.c index 69a6de1..ee296ce 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -4932,7 +4932,7 @@ add_file_list_columns (FrWindow *window, /* Other columns */ for (j = 0, i = COLUMN_SIZE; i < NUMBER_OF_COLUMNS; i++, j++) { - GValue value = { 0, }; + GValue value_oc = { 0, }; renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (g_dpgettext2 (NULL, "File", titles[j]), @@ -4946,10 +4946,10 @@ add_file_list_columns (FrWindow *window, gtk_tree_view_column_set_sort_column_id (column, i); - g_value_init (&value, PANGO_TYPE_ELLIPSIZE_MODE); - g_value_set_enum (&value, PANGO_ELLIPSIZE_END); - g_object_set_property (G_OBJECT (renderer), "ellipsize", &value); - g_value_unset (&value); + g_value_init (&value_oc, PANGO_TYPE_ELLIPSIZE_MODE); + g_value_set_enum (&value_oc, PANGO_ELLIPSIZE_END); + g_object_set_property (G_OBJECT (renderer), "ellipsize", &value_oc); + g_value_unset (&value_oc); gtk_tree_view_append_column (treeview, column); } |