1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-27 13:25:05 +03:00
Commit Graph

89 Commits

Author SHA1 Message Date
J. Peter Mugaas
d2c329a9a4 Fix -Wimplicit-fallthrough warnings
Add "falls through" comments to quench implicit-fallthrough warnings
which are enabled by -Wextra under GCC 7.
2017-10-21 13:49:31 +02:00
David Kilzer
4472c3a5a5 Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029

Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports.
2016-05-23 15:01:07 +08:00
Jan Pokorný
9811ce7864 Fix typos: PATH_{ SEAPARATOR -> SEPARATOR }
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2016-04-15 22:22:43 +08:00
Daniel Veillard
15d12040ff Fix an fd leak in an error case 2014-02-06 10:38:00 +01:00
Daniel Veillard
b8bdc258de Avoid a deadcode in catalog.c
For https://bugzilla.gnome.org/show_bug.cgi?id=703504
2013-09-30 11:12:04 +08:00
Denis Pauk
e1631e1cfc Few cleanup patches for Windows
https://bugzilla.gnome.org/show_bug.cgi?id=690878
provided by Cole <coleharrisjohnson@gmail.com>
2013-03-27 09:55:14 +08:00
Daniel Veillard
f8e3db0445 Big space and tab cleanup
Remove all space before tabs and space and tabs at end of lines.
2012-09-11 13:26:36 +08:00
Daniel Veillard
61551a1eb7 Cleanup function xmlBufResetInput() to set input from Buffer
This was scattered in a number of modules, xmlParserInputPtr
have usually their base, cur and end pointer set from an
xmlBuf used as input.
* buf.c buf.h: add a new function implementing this setup
* parser.c HTMLparser.c catalog.c parserInternals.c xmlreader.c
  use the new function instead of digging into the buffer in
  all those modules
2012-07-23 14:24:27 +08:00
Daniel Veillard
2a1d2422a4 Convert catalog code to the new input buffers
Only one place where the buffers fields where accessed directly
2012-07-23 14:24:27 +08:00
Daniel Veillard
59df1e4f92 Avoid an extra operation
In the catalog code, tsan also complained of testing
the variable without locking and that was done a few lines below
2012-05-21 10:19:21 +08:00
Carlo Bramini
c43ac66988 Avoid a descriptor leak in catalog loading code
File descriptors could be leaked in xmlLoadFileContent()
2010-10-14 14:27:54 +02:00
Daniel Veillard
63806b5373 apply a couple of fixes based on a Coverity report forwarded by Derrick
* catalog.c: apply a couple of fixes based on a Coverity report
  forwarded by Derrick Price.
* VxWorks/README VxWorks/Makefile VxWorks/build.sh: instructions
  Makefile, and shell script to build on VxWorks 6.4+ provided by
  Jim Wert.
Daniel

svn path=/trunk/; revision=3747
2008-06-10 14:56:11 +00:00
Daniel Veillard
be8d9d33eb fixed bug #383687, some case of recursion on next were not caught in the
* catalog.c: fixed bug #383687, some case of recursion on next
  were not caught in the catalog code.
Daniel

svn path=/trunk/; revision=3628
2007-06-12 09:14:11 +00:00
Daniel Veillard
59d3ed8fe0 applied patch from Andreas Stricke to ease the compilation on Windows CE
* catalog.c libxml.h win32/wince/wincecompat.h win32/wince/wincecompat.c
  xmlIO.c nanohttp.c nanoftp.c trio.c triostr.c triostr.h: applied 
  patch from Andreas Stricke to ease the compilation on Windows CE
Daniel

svn path=/trunk/; revision=3600
2007-04-17 12:44:58 +00:00
Daniel Veillard
ed12138b18 "xmllint unusable on win32" so applied a libxml2 patch from Christian
* xmllint.c catalog.c: "xmllint unusable on win32" so applied
  a libxml2 patch from Christian Ehrlicher
Daniel

svn path=/trunk/; revision=3599
2007-04-17 12:33:19 +00:00
Daniel Veillard
2728f845c5 more cleanups based on coverity reports. Daniel
* SAX2.c catalog.c encoding.c entities.c example/gjobread.c
  python/libxml.c: more cleanups based on coverity reports.
Daniel
2006-03-09 16:49:24 +00:00
Daniel Veillard
27bec1461b Martin Cole pointed out a bug in xmlCatalogAdd() if /etc/xml/catalog
* catalog.c: Martin Cole pointed out a bug in xmlCatalogAdd()
  if /etc/xml/catalog doesn't exist.
Daniel
2006-02-24 20:22:27 +00:00
Daniel Veillard
890b5492c6 improve catalog debugging message patch from Rick Jones Daniel
* catalog.c: improve catalog debugging message patch from Rick Jones
Daniel
2006-02-23 08:14:00 +00:00
Daniel Veillard
5d4644ef6e revamped the elfgcchack.h format to cope with gcc4 change of aliasing
* doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h
  format to cope with gcc4 change of aliasing allowed scopes, had
  to add extra informations to doc/libxml2-api.xml to separate
  the header from the c module source.
* *.c: updated all c library files to add a #define bottom_xxx
  and reimport elfgcchack.h thereafter, and a bit of cleanups.
* doc//* testapi.c: regenerated when rebuilding the API
Daniel
2005-04-01 13:11:58 +00:00
Daniel Veillard
d0cf7f6eea integrated in "make tests" added -q option, and more conditional features
* Makefile.am gentest.py testapi.c: integrated in "make tests"
  added -q option, and more conditional features fixes
* catalog.c debugXML.c parser.c testThreads.c xmllint.c
  xmlschemastypes.c xmlwriter.cinclude/libxml/catalog.h
  include/libxml/debugXML.h: various compilation and conditional
  cleanups.
* doc/*: regenerated
Daniel
2004-11-09 16:17:02 +00:00
William M. Brack
b031cef5b5 fixed problem with NULL entry (bug 157407) fixed a couple of warnings (no
* catalog.c: fixed problem with NULL entry (bug 157407)
* xpath.c: fixed a couple of warnings (no change to logic)
2004-11-05 16:34:22 +00:00
Daniel Veillard
03a53c34db added checking for names values and dictionnaries generates a tons of
* debugXML.c include/libxml/xmlerror.h: added checking for names
  values and dictionnaries generates a tons of errors
* SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c
  include/libxml/tree.h: fixing the errors in the regression tests
Daniel
2004-10-26 16:06:51 +00:00
William M. Brack
181a1ca018 fix small leak 2004-10-06 18:00:29 +00:00
William M. Brack
6218b31b7f small change to last fix, to get xml:base right
* catalog.c: small change to last fix, to get xml:base right
2004-10-06 17:52:32 +00:00
William M. Brack
b7b54de6c6 added code to handle <group>, including dumping to output (bug 151924).
* catalog.c: added code to handle <group>, including dumping
  to output (bug 151924).
* xmlcatalog.c, xmlstring.c, parser.c: minor compiler warning
  cleanup (no change to logic)
2004-10-06 16:38:01 +00:00
Daniel Veillard
c815505f7d applied patches from Peter Breitenlohner to fix handling of white space
* catalog.c test/catalogs/white* result/catalogs/white*:
  applied patches from Peter Breitenlohner to fix handling
  of white space normalization in public ids and add tests
Daniel
2004-07-16 09:03:08 +00:00
Daniel Veillard
ab690c5e9e revert 2 parts of the patch, Daniel 2004-06-14 12:19:09 +00:00
Daniel Veillard
fb382b8990 patch from Igor for the default catalog path on Windows Daniel
* catalog.c: patch from Igor for the default catalog path on Windows
Daniel
2004-06-14 12:13:12 +00:00
Daniel Veillard
7feb0234b1 reverted the broken change. Daniel
* catalog.c: reverted the broken change.
Daniel
2004-05-18 10:49:20 +00:00
Daniel Veillard
f055293653 a couple of large static variable which should really not be declared as
* catalog.c: a couple of large static variable which should really
  not be declared as such cluttered the .bss section.
Daniel
2004-05-16 01:20:17 +00:00
Daniel Veillard
a8dc2886f4 fixes the comments for xmlCatalogDump and xmlDumpACatalog rebuilt to
* catalog.c: fixes the comments for xmlCatalogDump and xmlDumpACatalog
* doc/*: rebuilt to update
Daniel
2004-03-29 12:21:26 +00:00
Daniel Veillard
06d2524e80 applied a cleanup patch from Peter Breitenlohner removed a doc build
* Makefile.am catalog.c configure.in: applied a cleanup patch
  from Peter Breitenlohner
* tree.c: removed a doc build warning by fixing a param comment
* doc/* : rebuilt the docs
Daniel
2004-02-25 13:01:42 +00:00
Daniel Veillard
770075b500 fixed the main issues reported by Peter Breitenlohner cleanup speedup
* catalog.c: fixed the main issues reported by Peter Breitenlohner
* parser.c: cleanup
* valid.c: speedup patch from Petr Pajas
Daniel
2004-02-25 10:44:30 +00:00
William M. Brack
272693c7e1 minor error cleanup for gcc-3.3.[12] compilation warnings.
* catalog.c,relaxng.c,testAutomata.c,xpointer.c,genChRanges.py,
  chvalid.c,include/libxml/chvalid.h,doc/examples/test1.c:
  minor error cleanup for gcc-3.3.[12] compilation warnings.
2003-11-14 16:20:34 +00:00
William M. Brack
76e95df055 Changed all (?) occurences where validation macros (IS_xxx) had
* include/libxml/parserInternals.h HTMLparser.c HTMLtree.c
  SAX2.c catalog.c debugXML.c entities.c parser.c relaxng.c
  testSAX.c tree.c valid.c xmlschemas.c xmlschemastypes.c
  xpath.c: Changed all (?) occurences where validation macros
  (IS_xxx) had single-byte arguments to use IS_xxx_CH instead
  (e.g. IS_BLANK changed to IS_BLANK_CH).  This gets rid of
  many warning messages on certain platforms, and also high-
  lights places in the library which may need to be enhanced
  for proper UTF8 handling.
2003-10-18 16:20:14 +00:00
William M. Brack
871611bb03 enhanced macros to avoid breaking ABI from previous versions. modified to
* genChRanges.py, chvalid.c, include/libxml/chvalid.h,
  include/libxml/parserInternals.h: enhanced macros to avoid
  breaking ABI from previous versions.
* catalog.c, parser.c, tree.c: modified to use IS_* macros
  defined in parserInternals.h.  Makes maintenance much easier.
* testHTML.c, testSAX.c, python/libxml.c: minor fixes to avoid
  compilation warnings
* configuration.in: fixed pushHTML test error; enhanced for
  better devel (me) testing
2003-10-18 04:53:14 +00:00
William M. Brack
68aca051a6 new files for a different method for doing range validation of character
* genChRange.py, chvalid.def, chvalid.c, include/libxml/chvalid.h:
  new files for a different method for doing range validation
  of character data.
* Makefile.am, parserInternals.c, include/libxml/Makefile.am,
  include/libxml/parserInternals.h: modified for new range method.
* catalog.c: small enhance for warning message (using one
  of the new range routines)
2003-10-11 15:22:13 +00:00
Daniel Veillard
659e71ec24 Setting up the framework for structured error reporting, touches a lot of
* HTMLparser.c c14n.c catalog.c error.c globals.c parser.c
  parserInternals.c relaxng.c valid.c xinclude.c xmlIO.c xmlregexp.c
  xmlschemas.c xpath.c xpointer.c include/libxml/globals.h
  include/libxml/parser.h include/libxml/valid.h
  include/libxml/xmlerror.h: Setting up the framework for structured
  error reporting, touches a lot of modules, but little code now
  the error handling trail has been cleaned up.
Daniel
2003-10-10 14:10:40 +00:00
Daniel Veillard
69d2c171fa comment fix migrating the catalog code to the new infrastructure Daniel
* xinclude.c: comment fix
* catalog.c include/libxml/xmlerror.h: migrating the catalog code
  to the new infrastructure
Daniel
2003-10-09 11:46:07 +00:00
Daniel Veillard
a9cce9cd0d Okay this is scary but it is just adding a configure option to disable
* HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c
  encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c
  testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c
  testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c
  xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c
  example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h
  include/libxml/catalog.h include/libxml/debugXML.h
  include/libxml/entities.h include/libxml/nanohttp.h
  include/libxml/relaxng.h include/libxml/tree.h
  include/libxml/valid.h include/libxml/xmlIO.h
  include/libxml/xmlschemas.h include/libxml/xmlversion.h.in
  include/libxml/xpathInternals.h python/libxml.c:
  Okay this is scary but it is just adding a configure option
  to disable output, this touches most of the files.
Daniel
2003-09-29 13:20:24 +00:00
Daniel Veillard
5ee43b0600 trying to fix #118754 of possible recursion in the catalogs. Not
* catalog.c: trying to fix #118754 of possible recursion in the
  catalogs. Not fantastically happy about the current fix since
  it's likely to break under very thread intensive concurrent
  access to the catalog. Better solution might to keep the depth
  an extra argument to the resolution functions.
Daniel
2003-08-04 00:58:46 +00:00
William M. Brack
59002e7bea Fixed multithreading problem 2003-07-04 17:01:59 +00:00
Daniel Veillard
c3ca5ba405 removed multiple warning, this fixed a bug and should close #111574 Daniel
* DOCBparser.c catalog.c parser.c relaxng.c: removed multiple
  warning, this fixed a bug and should close #111574
Daniel
2003-05-09 22:26:28 +00:00
Daniel Veillard
85095e2c07 try to find more places where xmlCanonicPath() must be used to convert
* DOCBparser.c SAX.c catalog.c debugXML.c parser.c: try to find
  more places where xmlCanonicPath() must be used to convert
  filenames to URLs, trying to fix #111088
Daniel
2003-04-23 13:56:44 +00:00
Daniel Veillard
3c908dca47 added xmlMallocAtomic() to be used when allocating blocks which do not
* DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c
  nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c
  xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c
  include/libxml/globals.h include/libxml/xmlmemory.h: added
  xmlMallocAtomic() to be used when allocating blocks which
  do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet()
  to allow registering the full set of functions needed by
  a garbage collecting allocator like libgc, ref #109944
Daniel
2003-04-19 00:07:51 +00:00
Daniel Veillard
3e59fc52d5 added support for large file, tested with a 3+GB instance, and some
* libxml.h include/libxml/parser.h parser.c xmlIO.c DOCBparser.c:
  added support for large file, tested with a 3+GB instance,
  and some cleanup.
* catalog.c: added a TODO
* Makefile.am: added some "make tests" comments
Daniel
2003-04-18 12:34:58 +00:00
Daniel Veillard
580ced8ee2 fixed Red Hat bug #86118 use libxml2.spec instead of libxml.spec fixed
* configure.in Makefile.am: fixed Red Hat bug #86118 use libxml2.spec
  instead of libxml.spec
* relaxng.c: fixed some of the error reporting excessive
  verbosity
* catalog.c debugXML.c valid.c xmlreader.c xmlschemas.c xpath.c
  xmlschemastypes.c: removed some warnings from gcc
* doc/libxml2-api.xml: rebuilt
Daniel
2003-03-21 21:22:48 +00:00
Daniel Veillard
652d8a9494 fixed bug #104817 with delegateURI fixing bugs #104123 and #104125 Daniel
* catalog.c: fixed bug #104817 with delegateURI
* xpath.c: fixing bugs #104123 and #104125
Daniel
2003-02-04 19:28:49 +00:00
Daniel Veillard
5aad832aa3 a bit more cleanup Daniel
* catalog.c doc/libxml2-api.xml: a bit more cleanup
Daniel
2002-12-11 15:59:44 +00:00
Igor Zlatkovic
130e5791b6 completed the #96963 fix 2002-11-06 22:51:58 +00:00