2025-07-05 20:00 ftp://ftp.de.debian.org/debian/pool/main/r/root-tail/root-tail_1.3.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=motif --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 -j6 platform: Linux-6.1.0-37-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.67 compiler: g++ (Debian 12.2.0-14+deb12u1) 12.2.0 cppcheck: head 2.17.0 head-info: 9b11b6b (2025-07-04 16:03:30 +0200) count: 22 42 elapsed-time: 1.3 1.0 head-timing-info: old-timing-info: head results: root-tail-1.3/root-tail.c:189:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:225:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:252:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XA_WINDOW [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:298:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:408:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable None [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:720:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:1000:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:1311:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_CTYPE [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:1575:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SA_RESTART [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:1588:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:1602:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:1616:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] root-tail-1.3/root-tail.c:372:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] root-tail-1.3/root-tail.c:1387:19: warning: %li in format string (no. 1) requires 'long *' but the argument type is 'unsigned long *'. [invalidScanfArgType_int] root-tail-1.3/root-tail.c:693:3: warning: If memory allocation fails, then there is a possible null pointer dereference: r [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:690:17: note: Assuming allocation function fails root-tail-1.3/root-tail.c:690:17: note: Assignment 'r=xmalloc(l2+1)', assigned value is 0 root-tail-1.3/root-tail.c:693:3: note: Null pointer dereference root-tail-1.3/root-tail.c:958:15: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1045:19: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1045:19: note: Assignment 'p=xstrdup(p)', assigned value is 0 root-tail-1.3/root-tail.c:958:15: note: Null pointer dereference root-tail-1.3/root-tail.c:1084:22: warning: If memory allocation fails, then there is a possible null pointer dereference: str [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1192:34: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1192:34: note: Calling function 'insert_new_line', 1st argument 'xstrdup("[")' value is 0 root-tail-1.3/root-tail.c:1084:22: note: Null pointer dereference root-tail-1.3/root-tail.c:692:13: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] root-tail-1.3/root-tail.c:690:17: note: Assuming allocation function fails root-tail-1.3/root-tail.c:690:17: note: Assignment 'r=xmalloc(l2+1)', assigned value is 0 root-tail-1.3/root-tail.c:692:13: note: Null pointer addition root-tail-1.3/root-tail.c:388:27: style: Local variable 'e' shadows outer variable [shadowVariable] root-tail-1.3/root-tail.c:294:25: note: Shadowed declaration root-tail-1.3/root-tail.c:388:27: note: Shadow variable root-tail-1.3/root-tail.c:1624:21: style: Parameter 'myname' can be declared as pointer to const [constParameterPointer] root-tail-1.3/root-tail.c:454:18: style: Variable 'foreground' is assigned a value that is never used. [unreadVariable] root-tail-1.3/root-tail.c:746:9: style: Variable 'p' is assigned a value that is never used. [unreadVariable] diff: 2.17.0 root-tail-1.3/root-tail.c:1070:31: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1045:19: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1045:19: note: Assignment 'p=xstrdup(p)', assigned value is 0 root-tail-1.3/root-tail.c:1070:31: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1131:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1131:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1132:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1132:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1133:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1133:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1134:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1134:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1135:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1135:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1136:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1136:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1137:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1137:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1138:7: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1130:37: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1130:37: note: Assignment 'e=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:1138:7: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1427:11: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1426:23: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1426:23: note: Assignment 'e=xmalloc(sizeof(struct logfile_entry))', assigned value is 0 root-tail-1.3/root-tail.c:1427:11: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1428:11: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1426:23: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1426:23: note: Assignment 'e=xmalloc(sizeof(struct logfile_entry))', assigned value is 0 root-tail-1.3/root-tail.c:1428:11: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1454:11: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1426:23: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1426:23: note: Assignment 'e=xmalloc(sizeof(struct logfile_entry))', assigned value is 0 root-tail-1.3/root-tail.c:1454:11: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1455:11: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1426:23: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1426:23: note: Assignment 'e=xmalloc(sizeof(struct logfile_entry))', assigned value is 0 root-tail-1.3/root-tail.c:1455:11: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1456:11: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1426:23: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1426:23: note: Assignment 'e=xmalloc(sizeof(struct logfile_entry))', assigned value is 0 root-tail-1.3/root-tail.c:1456:11: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1457:11: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1426:23: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1426:23: note: Assignment 'e=xmalloc(sizeof(struct logfile_entry))', assigned value is 0 root-tail-1.3/root-tail.c:1457:11: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:1458:11: warning: If memory allocation fails, then there is a possible null pointer dereference: e [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:1426:23: note: Assuming allocation function fails root-tail-1.3/root-tail.c:1426:23: note: Assignment 'e=xmalloc(sizeof(struct logfile_entry))', assigned value is 0 root-tail-1.3/root-tail.c:1458:11: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:692:13: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] root-tail-1.3/root-tail.c:690:17: note: Assuming allocation function fails root-tail-1.3/root-tail.c:690:17: note: Assignment 'r=xmalloc(l2+1)', assigned value is 0 root-tail-1.3/root-tail.c:692:13: note: Null pointer addition head root-tail-1.3/root-tail.c:692:13: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] root-tail-1.3/root-tail.c:690:17: note: Assuming allocation function fails root-tail-1.3/root-tail.c:690:17: note: Assignment 'r=xmalloc(l2+1)', assigned value is 0 root-tail-1.3/root-tail.c:692:13: note: Null pointer addition 2.17.0 root-tail-1.3/root-tail.c:872:3: warning: If memory allocation fails, then there is a possible null pointer dereference: new [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:870:35: note: Assuming allocation function fails root-tail-1.3/root-tail.c:870:35: note: Assignment 'new=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:872:3: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:873:3: warning: If memory allocation fails, then there is a possible null pointer dereference: new [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:870:35: note: Assuming allocation function fails root-tail-1.3/root-tail.c:870:35: note: Assignment 'new=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:873:3: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:874:3: warning: If memory allocation fails, then there is a possible null pointer dereference: new [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:870:35: note: Assuming allocation function fails root-tail-1.3/root-tail.c:870:35: note: Assignment 'new=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:874:3: note: Null pointer dereference 2.17.0 root-tail-1.3/root-tail.c:875:3: warning: If memory allocation fails, then there is a possible null pointer dereference: new [nullPointerOutOfMemory] root-tail-1.3/root-tail.c:870:35: note: Assuming allocation function fails root-tail-1.3/root-tail.c:870:35: note: Assignment 'new=xmalloc(sizeof(struct line_node))', assigned value is 0 root-tail-1.3/root-tail.c:875:3: note: Null pointer dereference DONE