2025-08-29 09:25 ftp://ftp.de.debian.org/debian/pool/main/t/tree-sitter-markdown/tree-sitter-markdown_0.2.3.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=python --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-79-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.18.0 head-info: 12b7eff (2025-08-29 11:00:35 +0200) count: 20 20 elapsed-time: 663.5 671.9 head-timing-info: old-timing-info: head results: tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:82:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:371:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:82:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:83:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:371:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:83:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:84:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:371:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:84:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:85:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:371:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:85:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:70:36: style: Parameter 's' can be declared as pointer to const [constParameterPointer] tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:388:69: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1564:34: style: Condition 'ATX_H6_MARKER==ATX_H1_MARKER+5' is always true [knownConditionTrueFalse] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:258:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:258:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:259:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:259:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:260:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:260:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:261:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:261:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:262:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:262:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:263:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:263:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:264:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:17: note: Calling function 'deserialize', 1st argument 's' value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:264:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1562:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1562:5: note: Null pointer dereference tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1508:28: style: Variable 's->matched' is reassigned a value before the old one has been used. [redundantAssignment] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1504:28: note: s->matched is assigned tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1508:28: note: s->matched is overwritten tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:291:31: style: Parameter 's' can be declared as pointer to const [constParameterPointer] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1587:62: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:82:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [ctunullpointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:370:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:371:16: note: Calling function deserialize, 1st argument is null tree-sitter-markdown-0.2.3/tree-sitter-markdown-inline/src/scanner.c:82:5: note: Dereferencing argument s that is null tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:258:5: warning: If memory allocation fails, then there is a possible null pointer dereference: s [ctunullpointerOutOfMemory] tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:35: note: Assuming allocation function fails tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1561:18: note: Assignment 's=(struct Scanner*)malloc(sizeof(struct Scanner))', assigned value is 0 tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:1568:16: note: Calling function deserialize, 1st argument is null tree-sitter-markdown-0.2.3/tree-sitter-markdown/src/scanner.c:258:5: note: Dereferencing argument s that is null diff: DONE