[libxml2] Avoid function/data pointer conversion in xpath.c



commit 229d1f93ceaa5e29a1e8455e73a7f346993d20b3
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Aug 22 13:21:57 2016 +0200

    Avoid function/data pointer conversion in xpath.c
    
    Fixes a `-pedantic` compiler warning.

 xpath.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/xpath.c b/xpath.c
index 5a01b1b..79ea535 100644
--- a/xpath.c
+++ b/xpath.c
@@ -935,7 +935,7 @@ struct _xmlXPathStepOp {
     int value3;
     void *value4;
     void *value5;
-    void *cache;
+    xmlXPathFunction cache;
     void *cacheURI;
 };
 
@@ -13565,7 +13565,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
                    }
                 }
                 if (op->cache != NULL)
-                    XML_CAST_FPTR(func) = op->cache;
+                    func = op->cache;
                 else {
                     const xmlChar *URI = NULL;
 
@@ -13592,7 +13592,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
                                         (char *)op->value4);
                         XP_ERROR0(XPATH_UNKNOWN_FUNC_ERROR);
                     }
-                    op->cache = XML_CAST_FPTR(func);
+                    op->cache = func;
                     op->cacheURI = (void *) URI;
                 }
                 oldFunc = ctxt->context->function;


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