[libgovirt] Don't use variables named 'link'
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] Don't use variables named 'link'
- Date: Tue, 8 Oct 2013 17:07:07 +0000 (UTC)
commit 7e8e384628ba055473f451c7bb63f2ab1e5b819c
Author: Christophe Fergeau <cfergeau redhat com>
Date: Tue Oct 8 18:35:26 2013 +0200
Don't use variables named 'link'
This causes gcc warnings on EL6:
ovirt-resource.c: In function 'ovirt_resource_set_sub_collections_from_xml':
ovirt-resource.c:346: warning: declaration of 'link' shadows a global
declaration
/
govirt/ovirt-resource.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/govirt/ovirt-resource.c b/govirt/ovirt-resource.c
index e0fa108..fca06e8 100644
--- a/govirt/ovirt-resource.c
+++ b/govirt/ovirt-resource.c
@@ -343,23 +343,23 @@ static gboolean
ovirt_resource_set_sub_collections_from_xml(OvirtResource *resource,
RestXmlNode *node)
{
- RestXmlNode *link;
+ RestXmlNode *link_node;
const char *link_key = g_intern_string("link");
- link = g_hash_table_lookup(node->children, link_key);
- if (link == NULL)
+ link_node = g_hash_table_lookup(node->children, link_key);
+ if (link_node == NULL)
return FALSE;
- for (; link != NULL; link = link->next) {
+ for (; link_node != NULL; link_node = link_node->next) {
const char *link_name;
const char *href;
- g_warn_if_fail(link != NULL);
- g_warn_if_fail(link->name != NULL);
- g_warn_if_fail(strcmp(link->name, "link") == 0);
+ g_warn_if_fail(link_node != NULL);
+ g_warn_if_fail(link_node->name != NULL);
+ g_warn_if_fail(strcmp(link_node->name, "link") == 0);
- link_name = rest_xml_node_get_attr(link, "rel");
- href = rest_xml_node_get_attr(link, "href");
+ link_name = rest_xml_node_get_attr(link_node, "rel");
+ href = rest_xml_node_get_attr(link_node, "href");
if ((link_name != NULL) && (href != NULL)) {
ovirt_resource_add_sub_collection(resource, link_name, href);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]