Commit graph

11 commits

Author SHA1 Message Date
Sebastian Pipping
fe04a7f0ff lib/xmlparse.c: Address clang-tidy warning misc-no-recursion 2025-03-30 20:54:46 +02:00
Sebastian Pipping
ac488f2d69 apply-clang-tidy.sh: Enable warning bugprone-narrowing-conversions 2025-03-30 18:52:09 +02:00
Sebastian Pipping
2ae87fa583 tests: Address clang-tidy warning bugprone-suspicious-string-compare
The symptom was:
> [..]/expat/tests/handlers.c:135:19: error: function 'strcmp' is called without explicitly comparing result [bugprone-suspicious-string-compare,-warnings-as-errors]
>   135 |   if (id != -1 && xcstrcmp(atts[id], info->id_name)) {
>       |                   ^
>       |                                                     != 0
2025-03-30 18:52:09 +02:00
Sebastian Pipping
66db1f2d05 apply-clang-tidy.sh: Exclude include-only file lib/xcsinc.c
.. from inspection in isolation
2025-03-30 18:52:09 +02:00
Sebastian Pipping
2b2a24691a Sync file headers 2025-03-27 17:45:25 +01:00
Sebastian Pipping
89026a3c6b apply-clang-tidy.sh: Re-enable warning clang-analyzer-valist.Uninitialized 2025-03-27 03:12:33 +01:00
Sebastian Pipping
7e2a0da9ba lib: Hide some test-only code behind new macro XML_TESTING 2024-02-21 13:07:35 +01:00
Sebastian Pipping
2a10e173ab Sync file headers 2024-02-06 14:13:00 +01:00
Sebastian Pipping
226a1527cf clang-tidy: Address warning readability-named-parameter 2024-01-12 23:27:19 +01:00
Sebastian Pipping
225ebd45e1 clang-tidy: Address warning readability-avoid-const-params-in-decls
clang-tidy output was:
> [..]/tests/handlers.h:502:64: error: parameter 'index' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]
>   502 | _handler_record_get(const struct handler_record_list *storage, const int index,
>       |                                                                ^~~~~
> [..]/tests/handlers.h:503:39: error: parameter 'line' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]
>   503 |                     const char *file, const int line);
>       |                                       ^~~~~
2024-01-12 22:19:05 +01:00
Sebastian Pipping
f832f7b981 Make GitHub Actions enforce clang-tidy clean code 2024-01-12 17:26:50 +01:00