]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
etc/cppcheck/cppcheck.suppress: Suppress nullPointerOutOfMemory
authorAlejandro Colomar <alx@kernel.org>
Fri, 14 Mar 2025 17:41:13 +0000 (18:41 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 14 Mar 2025 17:47:24 +0000 (18:47 +0100)
It causes false positives:

CPPCHECK .tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c.lint-c.cppcheck.touch
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:35:5: warning: inconclusive: If memory allocation fails, then there is a possible null pointer dereference: fhp [nullPointerOutOfMemory]
    fhp->handle_bytes = 0;
    ^
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:26:17: note: Assuming allocation function fails
    fhp = malloc(fhsize);
                ^
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:26:17: note: Assignment 'fhp=malloc(fhsize)', assigned value is 0
    fhp = malloc(fhsize);
                ^
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:35:5: note: Null pointer dereference
    fhp->handle_bytes = 0;
    ^

Signed-off-by: Alejandro Colomar <alx@kernel.org>
etc/cppcheck/cppcheck.suppress

index cb36500b150fb252508e428720a0202febcd5616..c55a575bc6ae4332f1533d41a0bb696a96e3e051 100644 (file)
@@ -4,6 +4,7 @@ constParameter
 constParameterCallback
 knownConditionTrueFalse
 missingIncludeSystem
+nullPointerOutOfMemory
 redundantContinue
 unassignedVariable
 uninitvar