[yelp] Fix variable shadowing warnings
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] Fix variable shadowing warnings
- Date: Mon, 9 Feb 2015 23:36:37 +0000 (UTC)
commit c590e47e901accef2f38c514c0d759520e5c169d
Author: David King <amigadave amigadave com>
Date: Mon Feb 9 21:14:45 2015 +0000
Fix variable shadowing warnings
libyelp/yelp-mallard-document.c | 21 ++++++++++-----------
libyelp/yelp-uri.c | 1 -
libyelp/yelp-view.c | 35 +++++++++++++++++------------------
3 files changed, 27 insertions(+), 30 deletions(-)
---
diff --git a/libyelp/yelp-mallard-document.c b/libyelp/yelp-mallard-document.c
index 3ec6008..4c6d2ea 100644
--- a/libyelp/yelp-mallard-document.c
+++ b/libyelp/yelp-mallard-document.c
@@ -574,25 +574,24 @@ mallard_page_data_walk (MallardPageData *page_data)
xmlAddChild (title_node, xmlCopyNode (node, 1));
}
if (!page_data->link_title) {
- xmlNodePtr title_node = xmlNewChild (info,
- priv->cache_ns,
- BAD_CAST "title", NULL);
- xmlSetProp (title_node, BAD_CAST "type", BAD_CAST "link");
+ xmlNodePtr title_node2 = xmlNewChild (info,
+ priv->cache_ns,
+ BAD_CAST "title", NULL);
+ xmlSetProp (title_node2, BAD_CAST "type", BAD_CAST "link");
for (node = child->children; node; node = node->next) {
- xmlAddChild (title_node, xmlCopyNode (node, 1));
+ xmlAddChild (title_node2, xmlCopyNode (node, 1));
}
}
if (!page_data->sort_title) {
- xmlNodePtr title_node = xmlNewChild (info,
- priv->cache_ns,
- BAD_CAST "title", NULL);
- xmlSetProp (title_node, BAD_CAST "type", BAD_CAST "sort");
+ xmlNodePtr title_node2 = xmlNewChild (info,
+ priv->cache_ns,
+ BAD_CAST "title", NULL);
+ xmlSetProp (title_node2, BAD_CAST "type", BAD_CAST "sort");
for (node = child->children; node; node = node->next) {
- xmlAddChild (title_node, xmlCopyNode (node, 1));
+ xmlAddChild (title_node2, xmlCopyNode (node, 1));
}
}
if (page_data->page_title == NULL) {
- YelpMallardDocumentPrivate *priv = GET_PRIV (page_data->mallard);
xmlXPathObjectPtr obj;
page_data->xpath->node = child;
obj = xmlXPathCompiledEval (priv->normalize, page_data->xpath);
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index 8d15561..81f2c3c 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -306,7 +306,6 @@ resolve_start (YelpUri *uri)
static void
resolve_sync (YelpUri *uri)
{
- gchar *tmp;
YelpUriPrivate *priv = GET_PRIV (uri);
if (g_str_has_prefix (priv->res_arg, "ghelp:")
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index c4c9532..6a07b16 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -1154,26 +1154,26 @@ popup_save_code (GtkMenuItem *item,
NULL,
&error);
if (stream == NULL) {
- GtkWidget *dialog = gtk_message_dialog_new (gtk_widget_get_visible (window) ? GTK_WINDOW
(window) : NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- "%s", error->message);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ GtkWidget *dlg = gtk_message_dialog_new (gtk_widget_get_visible (window) ? GTK_WINDOW (window) :
NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "%s", error->message);
+ gtk_dialog_run (GTK_DIALOG (dlg));
+ gtk_widget_destroy (dlg);
g_error_free (error);
}
else {
/* FIXME: we should do this async */
GDataOutputStream *datastream = g_data_output_stream_new (G_OUTPUT_STREAM (stream));
if (!g_data_output_stream_put_string (datastream, priv->popup_code_text, NULL, &error)) {
- GtkWidget *dialog = gtk_message_dialog_new (gtk_widget_get_visible (window) ? GTK_WINDOW
(window) : NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- "%s", error->message);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ GtkWidget *dlg = gtk_message_dialog_new (gtk_widget_get_visible (window) ? GTK_WINDOW
(window) : NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "%s", error->message);
+ gtk_dialog_run (GTK_DIALOG (dlg));
+ gtk_widget_destroy (dlg);
g_error_free (error);
}
g_object_unref (datastream);
@@ -1313,7 +1313,7 @@ view_populate_popup (YelpView *view,
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
else {
- GSList *cur;
+ GSList *l;
item = gtk_menu_item_new_with_mnemonic (_("_Open Link"));
g_signal_connect (item, "activate",
@@ -1334,9 +1334,9 @@ view_populate_popup (YelpView *view,
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
- for (cur = priv->link_actions; cur != NULL; cur = cur->next) {
+ for (l = priv->link_actions; l != NULL; l = l->next) {
gboolean add;
- YelpActionEntry *entry = (YelpActionEntry *) cur->data;
+ YelpActionEntry *entry = (YelpActionEntry *) l->data;
if (entry->func == NULL)
add = TRUE;
else
@@ -2047,7 +2047,6 @@ document_callback (YelpDocument *document,
g_free (real_id);
}
else {
- GParamSpec *spec;
g_free (priv->page_id);
priv->page_id = real_id;
spec = g_object_class_find_property ((GObjectClass *) YELP_VIEW_GET_CLASS (view),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]