Sebastian Pipping
0c5b205a01
xmlwf: Address clang-tidy warning bugprone-narrowing-conversions
...
The symptom was:
> [..]/expat/xmlwf/xmlfile.c:204:13: error: narrowing conversion from 'ssize_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
> 204 | nread = read(fd, buf, g_read_size_bytes);
> | ^
> [..]/expat/xmlwf/xmlwf.c:314:14: error: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
> 314 | numBytes = count * sizeof(XML_Char);
> | ^
The solution to read(3) was copied from file xmlwf/readfilemap.c for now.
2025-03-30 18:52:09 +02:00
Sebastian Pipping
2a10e173ab
Sync file headers
2024-02-06 14:13:00 +01:00
Sebastian Pipping
09fdf998e7
xmlwf: Support disabling reparse deferral
...
Rebased-and-adapted-by: Snild Dolkow <snild@sony.com>
2024-01-29 19:59:18 +01:00
Sebastian Pipping
caa2719863
Simplify "defined(XML_DTD) || XML_GE == 1" to "XML_GE == 1"
2023-11-07 13:00:42 +01:00
Sebastian Pipping
2848dc4e70
Simplify "! defined(XML_DTD) && XML_GE == 0" to "XML_GE == 0"
2023-11-07 13:00:42 +01:00
Sebastian Pipping
0f075ec8ec
lib|xmlwf|cmake: Extend scope of billion laughs attack protection
...
.. from "defined(XML_DTD)" to "defined(XML_DTD) || XML_GE==1".
2023-11-06 20:43:09 +01:00
Sebastian Pipping
ab43d8d116
Make inclusion to expat_config.h consistent
...
.. and priorize the local build over the system header.
2023-10-04 19:58:28 +02:00
Sebastian Pipping
92cdc783f1
xmlwf: Get help output alignment back in order
2023-09-29 12:55:17 +02:00
Sebastian Pipping
4c6731ad11
xmlwf: Use XMLWF_EXIT_SUCCESS where missing
2023-09-29 12:55:17 +02:00
Sebastian Pipping
0b3ef852bc
xmlwf: Support --help and --version
2023-09-29 12:55:17 +02:00
Sebastian Pipping
900d2a7cd2
xmlwf: Better document that usage(..) calls exit(..)
2023-09-29 12:55:17 +02:00
Sebastian Pipping
bc26bc5896
xmlwf: Break up conditional before upcoming extension
2023-09-29 12:06:05 +02:00
Sebastian Pipping
d248e7e923
xmlwf: Support custom buffer size for XML_GetBuffer and read
2023-09-28 17:06:39 +02:00
Sebastian Pipping
2f2cda0a2a
xmlwf: Improve language and URL clickability in help output
2023-09-11 21:54:24 +02:00
Sean McBride
c094e450a1
Fixed some clang -Wcast-qual warnings
...
Mostly added various missing consts, thus eliminating the casting away of constness. In a few cases, just removed unnecessary casts entirely.
2022-11-01 18:54:12 -04:00
Sean McBride
fc594f380d
Fixed some -Wcast-qual warnings by just using NULL for default value of output param
...
The `endptr` parameter of both tcstof() and strtoul() are output-only; its initial value is not read, and so may as well be NULL.
2022-11-01 17:20:26 -04:00
Sean McBride
2ee10be8c8
Fixed all clang -Wconditional-uninitialized warnings
...
Just initialized to zero to shut the compiler up.
2022-10-25 09:03:12 -04:00
Sebastian Pipping
39b2e99355
Sync file headers
2022-07-14 22:26:59 +02:00
orbitcowboy
4ead0836c5
Fixed typo in nsattcmp attribute handling
2022-04-01 16:37:13 +02:00
Sebastian Pipping
317c91776a
Sync file headers
2022-02-15 21:23:29 +01:00
Sebastian Pipping
039af6611d
Sync file headers
2022-01-29 23:28:05 +01:00
Sebastian Pipping
85a6f8fcdb
xmlwf: Fix a memory leak on output file opening error
2022-01-24 15:41:32 +01:00
Sebastian Pipping
c2b5d52404
xmlwf: Address Clang 13 warning -Wunused-but-set-variable
2021-12-26 19:51:44 +01:00
Sebastian Pipping
c6223b3b0f
xmlwf: Add support for custom attack protection parameters
2021-05-07 18:25:07 +02:00
Sebastian Pipping
65cddaa4e9
xmlwf: Include expat_config.h so we can check for macro XML_DTD
2021-05-07 18:25:07 +02:00
Sebastian Pipping
df42f935bf
Increase precision in existing MIT headers based on Git history
2021-05-02 19:53:29 +02:00
Sebastian Pipping
c028d9b280
xmlwf: Simplify synopsis
2021-04-25 17:49:21 +02:00
Sebastian Pipping
810e240fde
xmlwf: Extract exit code constants
2021-04-19 19:32:29 +02:00
Sebastian Pipping
385aeb477b
xmlwf: Extract macro XMLWF_SHIFT_ARGUMENT
2021-04-19 19:30:12 +02:00
Sebastian Pipping
a6f3f2a3a2
xmlwf: Split off exit status 4 for invalid argument invokation
2021-03-20 18:20:09 +01:00
Tim Bray
56c18c63ed
Add argument -k to allow continuing after non-fatal errors
2021-03-16 20:40:26 -07:00
Kleber Tarcísio
12a7276f3e
xmlwf: Checks value after calling malloc
2020-06-22 19:56:34 +02:00
Joe Orton
f1634dbaea
Update xmlwf to exit with 3 if an output file could not be opened.
...
Update xmlwf exit code docs per review.
2020-05-13 08:36:56 +01:00
Sebastian Pipping
83e1688c74
xmlwf: Improve output of "xmlwf -h" by two tiny bits
2019-11-26 16:17:44 +01:00
Sebastian Pipping
70a4a691fc
xmlwf: Fix exit code for case without "-d DIRECTORY"
2019-09-06 19:53:36 +02:00
Sebastian Pipping
4a09fc9024
xmlwf: Get -h and -v out of usage summary line
2019-09-05 16:38:41 +02:00
Sebastian Pipping
041e7768be
xmlwf: Improve "xmlwf -h" help output
2019-09-05 00:45:14 +02:00
David Loffredo
1ec27cb32f
update xmlwf and tests to new UNUSED_P definition
...
Signed-off-by: David Loffredo <loffredo@steptools.com>
2019-08-16 12:20:00 -04:00
clang-format
d248bbd940
Mass-apply clang-format 9 using ./apply-clang-format.sh
2019-08-03 21:31:44 +02:00
Sebastian Pipping
f75a40cbae
xmlwf|tests: Repeat L string prefix to fix compilation
2017-10-04 22:55:42 +02:00
Sebastian Pipping
41cc68cb67
xmlwf.c: Fix code indentation
2017-10-04 21:14:10 +02:00
Sebastian Pipping
7b3f902a69
Make wmain work with MinGW
2017-09-09 18:59:29 +02:00
Sebastian Pipping
df75ab14f4
xmlwf: Indent preprocessor code
2017-09-09 18:21:18 +02:00
Rhodri James
742fbf024f
Make xmlwf build with XML_UNICODE_WCHAR_T on MinGW
...
This seems to need some extra mangling of Makefile.am for MinGW.
* Add "-mwindows" to AM_CPPFLAGS
* Add "AM_LDFLAGS = -municode"
Running the XML tests (xmltest.sh) is problematic: it needs a
unicode-aware differ for starters
2017-09-04 14:29:39 +01:00
Sebastian Pipping
e4661bfb85
xmlwf: Address Clang Static Analyzer warning
2017-08-28 21:38:44 +02:00
Sebastian Pipping
0b44900fcb
xmlwf.c: Address unused parameter warning
2017-08-22 23:15:05 +02:00
Rhodri James
0abf000fa4
Plug memory leak in xmlwf's end of doctype declaration handler
2017-08-22 23:14:55 +02:00
Rhodri James
e424d3fb6a
Fix formatting and message re-use
2017-08-22 23:14:55 +02:00
Rhodri James
1726204ce2
Rename xmlCharDup to xcsdup and tighten up the code
2017-08-22 23:14:54 +02:00
Rhodri James
59d81f517d
Move static variables into a userdata structure
2017-08-22 22:21:10 +02:00