2025-11-27 09:37 ftp://ftp.de.debian.org/debian/pool/main/k/kilo/kilo_0.0.1+git20240726+ds.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --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-88-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.69 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.18.0 head-info: 9486fde (2025-11-26 08:20:02 +0100) count: 25 25 elapsed-time: 0.8 0.8 head-timing-info: old-timing-info: head results: kilo-0.0.1+git20240726+ds/kilo.c:207:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TCSAFLUSH [valueFlowBailoutIncompleteVar] kilo-0.0.1+git20240726+ds/kilo.c:229:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BRKINT [valueFlowBailoutIncompleteVar] kilo-0.0.1+git20240726+ds/kilo.c:334:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TIOCGWINSZ [valueFlowBailoutIncompleteVar] kilo-0.0.1+git20240726+ds/kilo.c:808:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] kilo-0.0.1+git20240726+ds/kilo.c:833:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] kilo-0.0.1+git20240726+ds/kilo.c:1293:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kilo-0.0.1+git20240726+ds/kilo.c:655:6: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] kilo-0.0.1+git20240726+ds/kilo.c:648:21: note: Assuming allocation function fails kilo-0.0.1+git20240726+ds/kilo.c:648:13: note: Assignment 'p=buf=malloc(totlen)', assigned value is 0 kilo-0.0.1+git20240726+ds/kilo.c:649:19: note: Assuming condition is false kilo-0.0.1+git20240726+ds/kilo.c:655:6: note: Null pointer dereference kilo-0.0.1+git20240726+ds/kilo.c:1091:28: warning: If memory allocation fails, then there is a possible null pointer dereference: saved_hl [nullPointerOutOfMemory] kilo-0.0.1+git20240726+ds/kilo.c:1090:38: note: Assuming allocation function fails kilo-0.0.1+git20240726+ds/kilo.c:1090:38: note: Assignment 'saved_hl=malloc(row->rsize)', assigned value is 0 kilo-0.0.1+git20240726+ds/kilo.c:1091:28: note: Null pointer dereference kilo-0.0.1+git20240726+ds/kilo.c:939:30: style: Local variable 'buf' shadows outer variable [shadowVariable] kilo-0.0.1+git20240726+ds/kilo.c:885:10: note: Shadowed declaration kilo-0.0.1+git20240726+ds/kilo.c:939:30: note: Shadow variable kilo-0.0.1+git20240726+ds/kilo.c:373:35: style: Parameter 'row' can be declared as pointer to const [constParameterPointer] kilo-0.0.1+git20240726+ds/kilo.c:391:11: style: Variable 'scs' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:392:11: style: Variable 'mcs' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:393:11: style: Variable 'mce' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:540:19: style: Variable 'p' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:592:36: style: Parameter 's' can be declared as pointer to const [constParameterPointer] kilo-0.0.1+git20240726+ds/kilo.c:684:45: style: Parameter 's' can be declared as pointer to const [constParameterPointer] kilo-0.0.1+git20240726+ds/kilo.c:797:22: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] kilo-0.0.1+git20240726+ds/kilo.c:884:11: style: Variable 'r' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:917:19: style: Variable 'c' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:918:28: style: Variable 'hl' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:986:11: style: Variable 'row' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:1066:19: style: Variable 'match' can be declared as pointer to const [constVariablePointer] kilo-0.0.1+git20240726+ds/kilo.c:93:9: style: struct member 'hlcolor::r' is never used. [unusedStructMember] kilo-0.0.1+git20240726+ds/kilo.c:93:11: style: struct member 'hlcolor::g' is never used. [unusedStructMember] kilo-0.0.1+git20240726+ds/kilo.c:93:13: style: struct member 'hlcolor::b' is never used. [unusedStructMember] diff: DONE