summaryrefslogtreecommitdiff
path: root/testapi.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2019-01-01 19:20:22 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2019-01-06 14:25:18 +0100
commite8fdf5df6e547b44092a549c01bb127aa75c01c7 (patch)
tree9ae35e920ea8ff6c17b3bf6ffa097bbeb8c4ef69 /testapi.c
parent731b50640975e732320567d210e4312846d9ef16 (diff)
downloadlibxml2-e8fdf5df6e547b44092a549c01bb127aa75c01c7.tar.gz
Fix unused function warning in testapi.c
Check whether all param and return types are known before generating functions for param types. Otherwise, unused functions end up in testapi.c.
Diffstat (limited to 'testapi.c')
-rw-r--r--testapi.c183
1 files changed, 73 insertions, 110 deletions
diff --git a/testapi.c b/testapi.c
index 4a751e20..980d7fb5 100644
--- a/testapi.c
+++ b/testapi.c
@@ -7511,13 +7511,6 @@ test_xmlLsOneNode(void) {
}
-#define gen_nb_char_ptr 1
-static char * gen_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_char_ptr(int no ATTRIBUTE_UNUSED, char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-
static int
test_xmlShell(void) {
int test_ret = 0;
@@ -7528,6 +7521,13 @@ test_xmlShell(void) {
}
+#define gen_nb_char_ptr 1
+static char * gen_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_char_ptr(int no ATTRIBUTE_UNUSED, char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
static int
test_xmlShellBase(void) {
int test_ret = 0;
@@ -9334,13 +9334,6 @@ test_xmlCleanupPredefinedEntities(void) {
}
-#define gen_nb_xmlEntitiesTablePtr 1
-static xmlEntitiesTablePtr gen_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, xmlEntitiesTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-
static int
test_xmlCopyEntitiesTable(void) {
int test_ret = 0;
@@ -9361,6 +9354,13 @@ test_xmlCreateEntitiesTable(void) {
}
+#define gen_nb_xmlEntitiesTablePtr 1
+static xmlEntitiesTablePtr gen_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, xmlEntitiesTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
static int
test_xmlDumpEntitiesTable(void) {
int test_ret = 0;
@@ -18145,16 +18145,6 @@ test_xmlSchematronNewParserCtxt(void) {
return(test_ret);
}
-#ifdef LIBXML_SCHEMATRON_ENABLED
-
-#define gen_nb_xmlSchematronPtr 1
-static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, xmlSchematronPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
static int
test_xmlSchematronNewValidCtxt(void) {
@@ -18165,19 +18155,19 @@ test_xmlSchematronNewValidCtxt(void) {
return(test_ret);
}
-#ifdef LIBXML_SCHEMATRON_ENABLED
-#define gen_nb_xmlSchematronParserCtxtPtr 1
-static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+static int
+test_xmlSchematronParse(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
}
-#endif
static int
-test_xmlSchematronParse(void) {
+test_xmlSchematronSetValidStructuredErrors(void) {
int test_ret = 0;
@@ -18197,16 +18187,6 @@ static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematron
static int
-test_xmlSchematronSetValidStructuredErrors(void) {
- int test_ret = 0;
-
-
- /* missing type support */
- return(test_ret);
-}
-
-
-static int
test_xmlSchematronValidateDoc(void) {
int test_ret = 0;
@@ -18665,13 +18645,6 @@ test_xmlBufShrink(void) {
}
-#define gen_nb_const_xmlBufPtr 1
-static xmlBufPtr gen_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, const xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-
static int
test_xmlBufUse(void) {
int test_ret = 0;
@@ -25100,13 +25073,6 @@ test_xmlAddRef(void) {
}
-#define gen_nb_xmlAttributeTablePtr 1
-static xmlAttributeTablePtr gen_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, xmlAttributeTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-
static int
test_xmlCopyAttributeTable(void) {
int test_ret = 0;
@@ -25188,13 +25154,6 @@ test_xmlCopyElementContent(void) {
}
-#define gen_nb_xmlElementTablePtr 1
-static xmlElementTablePtr gen_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, xmlElementTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-
static int
test_xmlCopyElementTable(void) {
int test_ret = 0;
@@ -25215,13 +25174,6 @@ test_xmlCopyEnumeration(void) {
}
-#define gen_nb_xmlNotationTablePtr 1
-static xmlNotationTablePtr gen_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, xmlNotationTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-
static int
test_xmlCopyNotationTable(void) {
int test_ret = 0;
@@ -25288,6 +25240,13 @@ test_xmlDumpAttributeDecl(void) {
}
+#define gen_nb_xmlAttributeTablePtr 1
+static xmlAttributeTablePtr gen_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, xmlAttributeTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
static int
test_xmlDumpAttributeTable(void) {
int test_ret = 0;
@@ -25373,6 +25332,13 @@ test_xmlDumpElementDecl(void) {
}
+#define gen_nb_xmlElementTablePtr 1
+static xmlElementTablePtr gen_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, xmlElementTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
static int
test_xmlDumpElementTable(void) {
int test_ret = 0;
@@ -25458,6 +25424,13 @@ test_xmlDumpNotationDecl(void) {
}
+#define gen_nb_xmlNotationTablePtr 1
+static xmlNotationTablePtr gen_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, xmlNotationTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
static int
test_xmlDumpNotationTable(void) {
int test_ret = 0;
@@ -29389,16 +29362,6 @@ test_xmlIO(void) {
printf("Module xmlIO: %d errors\n", test_ret);
return(test_ret);
}
-#ifdef LIBXML_AUTOMATA_ENABLED
-
-#define gen_nb_xmlAutomataPtr 1
-static xmlAutomataPtr gen_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, xmlAutomataPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
static int
test_xmlAutomataCompile(void) {
@@ -29419,6 +29382,16 @@ test_xmlAutomataGetInitState(void) {
return(test_ret);
}
+#ifdef LIBXML_AUTOMATA_ENABLED
+
+#define gen_nb_xmlAutomataPtr 1
+static xmlAutomataPtr gen_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, xmlAutomataPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
static int
test_xmlAutomataIsDeterminist(void) {
@@ -29453,16 +29426,6 @@ test_xmlAutomataIsDeterminist(void) {
return(test_ret);
}
-#ifdef LIBXML_AUTOMATA_ENABLED
-
-#define gen_nb_xmlAutomataStatePtr 1
-static xmlAutomataStatePtr gen_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, xmlAutomataStatePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
static int
test_xmlAutomataNewAllTrans(void) {
@@ -29631,6 +29594,16 @@ test_xmlAutomataNewTransition2(void) {
return(test_ret);
}
+#ifdef LIBXML_AUTOMATA_ENABLED
+
+#define gen_nb_xmlAutomataStatePtr 1
+static xmlAutomataStatePtr gen_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, xmlAutomataStatePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
static int
test_xmlAutomataSetFinalState(void) {
@@ -33908,16 +33881,6 @@ test_xmlRegExecPushString2(void) {
return(test_ret);
}
-#ifdef LIBXML_REGEXP_ENABLED
-
-#define gen_nb_xmlRegexpPtr 1
-static xmlRegexpPtr gen_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, xmlRegexpPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
static int
test_xmlRegNewExecCtxt(void) {
@@ -33938,6 +33901,16 @@ test_xmlRegexpCompile(void) {
return(test_ret);
}
+#ifdef LIBXML_REGEXP_ENABLED
+
+#define gen_nb_xmlRegexpPtr 1
+static xmlRegexpPtr gen_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, xmlRegexpPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
static int
test_xmlRegexpExec(void) {
@@ -34662,16 +34635,6 @@ test_xmlSchemaParse(void) {
return(test_ret);
}
-#ifdef LIBXML_SCHEMAS_ENABLED
-
-#define gen_nb_xmlSAXHandlerPtr_ptr 1
-static xmlSAXHandlerPtr * gen_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
- return(NULL);
-}
-static void des_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
-}
-#endif
-
static int
test_xmlSchemaSAXPlug(void) {