1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

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.
This commit is contained in:
Nick Wellnhofer
2019-01-01 19:20:22 +01:00
parent 731b506409
commit e8fdf5df6e
3 changed files with 93 additions and 122 deletions

187
testapi.c
View File

@@ -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,16 +18155,6 @@ 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) {
}
#endif
static int
test_xmlSchematronParse(void) {
@@ -18185,6 +18165,16 @@ test_xmlSchematronParse(void) {
return(test_ret);
}
static int
test_xmlSchematronSetValidStructuredErrors(void) {
int test_ret = 0;
/* missing type support */
return(test_ret);
}
#ifdef LIBXML_SCHEMATRON_ENABLED
#define gen_nb_xmlSchematronValidCtxtPtr 1
@@ -18196,16 +18186,6 @@ static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematron
#endif
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) {