Browse Source

* fixed the varargs warnings of libxml2

git-svn-id: trunk@12544 -
ivost 16 years ago
parent
commit
3d8388fd22

+ 0 - 5
packages/libxml/src/libxml2.pas

@@ -275,11 +275,6 @@ begin
   ReallocMem(Result, size);
 end;
 
-procedure fpcxmlGenericErrorHandler(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
-begin
-  writeln(msg);
-end;
-
 procedure fpcxmlStructuredErrorHandler(userData: pointer; error: xmlErrorPtr); XMLCALL;
 begin
   writeln('struct error');

+ 3 - 3
packages/libxml/src/parser.inc

@@ -565,7 +565,7 @@
  *
  * Display and format a warning messages, callback.
  *)
-  warningSAXFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  warningSAXFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
 (**
  * errorSAXFunc:
@@ -575,7 +575,7 @@
  *
  * Display and format an error messages, callback.
  *)
-  errorSAXFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  errorSAXFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
 (**
  * fatalErrorSAXFunc:
@@ -587,7 +587,7 @@
  * Note: so far fatalError() SAX callbacks are not used, error()
  *       get all the callbacks for errors.
  *)
-  fatalErrorSAXFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  fatalErrorSAXFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
 (**
  * isStandaloneSAXFunc:

+ 2 - 2
packages/libxml/src/relaxng.inc

@@ -22,8 +22,8 @@
 (**
  * A schemas validation context
  *)
-  xmlRelaxNGValidityErrorFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
-  xmlRelaxNGValidityWarningFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  xmlRelaxNGValidityErrorFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
+  xmlRelaxNGValidityWarningFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
   xmlRelaxNGParserCtxt = record end;
 

+ 2 - 2
packages/libxml/src/schematron.inc

@@ -36,8 +36,8 @@
 (**
  * A schemas validation context
  *)
-  xmlSchematronValidityErrorFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
-  xmlSchematronValidityWarningFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  xmlSchematronValidityErrorFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
+  xmlSchematronValidityWarningFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
   xmlSchematronParserCtxt = record end;
 

+ 2 - 2
packages/libxml/src/valid.inc

@@ -34,7 +34,7 @@
  * Callback called when a validity error is found. This is a message
  * oriented function similar to an *printf function.
  *)
-  xmlValidityErrorFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  xmlValidityErrorFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
 (**
  * xmlValidityWarningFunc:
@@ -47,7 +47,7 @@
  * Callback called when a validity warning is found. This is a message
  * oriented function similar to an *printf function.
  *)
-  xmlValidityWarningFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  xmlValidityWarningFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
 (*
  * xmlValidCtxt:

+ 1 - 1
packages/libxml/src/xmlerror.inc

@@ -829,7 +829,7 @@
  * Signature of the function to use when there is an error and
  * no parsing or validity context available .
  *)
-  xmlGenericErrorFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  xmlGenericErrorFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
 (**
  * xmlStructuredErrorFunc:

+ 2 - 2
packages/libxml/src/xmlschemas.inc

@@ -86,8 +86,8 @@
 (**
  * A schemas validation context
  *)
-  xmlSchemaValidityErrorFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
-  xmlSchemaValidityWarningFunc = procedure(ctx: pointer; msg: pchar; args: array of const); XMLCDECL;
+  xmlSchemaValidityErrorFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
+  xmlSchemaValidityWarningFunc = procedure(ctx: pointer; msg: pchar); XMLCDECL; varargs;
 
   xmlSchemaParserCtxt = record end;