Commit Graph

12 Commits

Author SHA1 Message Date
Sebastian Pipping
5bab452b49 lib: Address GCC 11.2.1 compiler warning
Symptom was:

In file included from xmltok.c:58:
xmltok_ns.c: In function ‘findEncodingNS’:
xmltok.h:276:10: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized]
  276 |   (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xmltok_ns.c:99:3: note: in expansion of macro ‘XmlUtf8Convert’
   99 |   XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
      |   ^~~~~~~~~~~~~~
xmltok.h:276:10: note: by argument 5 of type ‘const char *’ to ‘enum XML_Convert_Result(const ENCODING *, const char **, const char *, char **, const char *)’ {aka ‘enum XML_Convert_Result(const struct encoding *, const char **, const char *, char **, const char *)’}
  276 |   (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xmltok_ns.c:99:3: note: in expansion of macro ‘XmlUtf8Convert’
   99 |   XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
      |   ^~~~~~~~~~~~~~
In file included from xmltok.c:1666:
xmltok_ns.c:96:8: note: ‘buf’ declared here
   96 |   char buf[ENCODING_MAX];
      |        ^~~
2021-12-25 18:15:25 +01:00
Sebastian Pipping
df42f935bf Increase precision in existing MIT headers based on Git history 2021-05-02 19:53:29 +02:00
clang-format
d248bbd940 Mass-apply clang-format 9 using ./apply-clang-format.sh 2019-08-03 21:31:44 +02:00
Sebastian Pipping
a704c940a4 Inline copyright headers with C/C++ code where missing (#116) 2017-08-12 21:02:41 +02:00
Karl Waclawek
3ff6041e90 Change for MS VC++: Added #ifdefs to allow for passing xmltok_impl.c and
xmltok_ns.c to the compiler (to make them visible in IDE).
2006-11-26 17:34:46 +00:00
Karl Waclawek
bbe86f3dff Fix for bug #1065047. Improved const correctness. 2004-11-26 14:58:24 +00:00
Karl Waclawek
5ca83cc911 Changed calling convention macros to differentiate between
different types of function calls - see comments in internal.h.
2002-09-20 03:42:43 +00:00
Karl Waclawek
633caf8040 Fred and I added FASTCALL directives to xmltok.c and related files. 2002-09-05 18:21:01 +00:00
Fred L. Drake, Jr.
7fea03e40e De-tabify; minor code-style consistency changes. 2002-07-01 16:46:08 +00:00
Greg Stein
de857347b6 Remove acconfig.h altogether by removing XML_BYTE_ORDER. We can simply
use the BYTEORDER constant that ac_c_bigendian_cross.m4 generates.

* accconfig.h: removed; obsolete.

* lib/winconfig.h:
  - set the BYTEORDER constant, rather than XML_BYTE_ORDER, and leave
    a note about what we're assuming.

* lib/xmltok.c, lib/xmltok_ns.c:
  - change all XML_BYTE_ORDER references to BYTEORDER, and
    update the constants from 12, 21 to 1234, 4321 respectively.
2002-05-17 21:42:05 +00:00
Clark Cooper
c446fb274e Merged in modifications from perl-expat. Also fiddled around with more
configuration issues.
2000-09-21 21:20:18 +00:00
Clark Cooper
c135be083d These are the first check-ins for the libexpat task: create configuration
files and setup for building a shareable libexpat.
2000-09-18 16:26:23 +00:00