[dia] [scan-build] Dead assignment



commit b80f7c03516f6dafe6ba479bb4a534b072c662ba
Author: Hans Breuer <hans breuer org>
Date:   Tue Dec 29 12:57:10 2009 +0100

    [scan-build] Dead assignment
    
    intentionally ignoring return value of xmlNewChild()

 lib/plug-ins.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/plug-ins.c b/lib/plug-ins.c
index 695bd33..d7b9431 100644
--- a/lib/plug-ins.c
+++ b/lib/plug-ins.c
@@ -565,23 +565,23 @@ dia_pluginrc_write(void)
   ensure_pluginrc();
   for (tmp = plugins; tmp != NULL; tmp = tmp->next) {
     PluginInfo *info = tmp->data;
-    xmlNodePtr node, pluginnode, datanode;
+    xmlNodePtr node, pluginnode;
 
     if (info == NULL) {
       continue;
     }
 
     pluginnode = xmlNewNode(NULL, (const xmlChar *)"plugin");
-    datanode = xmlNewChild(pluginnode, NULL, (const xmlChar *)"name", (xmlChar *)info->name);
+    (void)xmlNewChild(pluginnode, NULL, (const xmlChar *)"name", (xmlChar *)info->name);
     /* FIXME: UNICODE_WORK_IN_PROGRESS why is this reencoding necessary ?*/
  {
      xmlChar *enc = xmlEncodeEntitiesReentrant(pluginnode->doc,
                                                (xmlChar *)info->description);
-     datanode = xmlNewChild(pluginnode, NULL, (const xmlChar *)"description", enc);
+     (void)xmlNewChild(pluginnode, NULL, (const xmlChar *)"description", enc);
      xmlFree(enc);
  }
     if (info->inhibit_load)
-      datanode = xmlNewChild(pluginnode, NULL, (const xmlChar *)"inhibit-load", NULL);
+      (void)xmlNewChild(pluginnode, NULL, (const xmlChar *)"inhibit-load", NULL);
 
     for (node = pluginrc->xmlRootNode->xmlChildrenNode; 
          node != NULL; 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]