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
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