zeniba-nsxiv/etc/woodpecker/clang-tidy-checks
NRK 5c6745436f [ci]: silence false positive warning
clang-tidy currently flags the following:

	util.c:57:8: error: 'ptr' may be set to null if 'realloc' fails, which may result in a leak of the original buffer [bugprone-suspicious-realloc-usage,-warnings-as-errors]
	        ptr = realloc(ptr, size);

the analysis here is correct, but if realloc fails, we simply exit so
there's no real "leak".

moreover this check is not very useful for nsxiv's codebase because we
do not use naked realloc(), instead we use the erealloc wrapper that
exits on failure. so just disable the warning entirely instead of
changing the source code to silence the false positive.
2023-05-13 23:28:27 +06:00

17 lines
635 B
Plaintext

# checks
clang-analyzer-*,clang-diagnostic-*,bugprone-*,performance-*,modernize-*
misc-*,android-cloexec-*,llvm-include-order
-readability-*,readability-duplicate-include,readability-misleading-indentation
# silence
-misc-unused-parameters
-bugprone-easily-swappable-parameters,-bugprone-narrowing-conversions,-bugprone-incorrect-roundings
-bugprone-implicit-widening-of-multiplication-result,-bugprone-integer-division
-android-cloexec-fopen,-android-cloexec-pipe,-cert-err33-c
-bugprone-assignment-in-if-condition
-bugprone-suspicious-realloc-usage
# false positive warnings
-clang-analyzer-valist.Uninitialized
-misc-no-recursion