2025-08-29 09:55 ftp://ftp.de.debian.org/debian/pool/main/u/uim-chewing/uim-chewing_0.1.0.orig.tar.gz 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 -j10 platform: Linux-6.14.8-2-pve-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.18.0 head-info: 327ef3c (2025-08-29 11:03:21 +0200) count: 2 18 elapsed-time: 0.0 0.1 head-timing-info: old-timing-info: head results: uim-chewing-0.1.0/src/chewing.c:46:0: error: failed to evaluate #if condition, undefined function-like macro invocation: UIM_VERSION_REQUIRE( ... ) [preprocessorErrorDirective] uim-chewing-0.1.0/src/chewing.c:46:2: error: failed to evaluate #if condition, undefined function-like macro invocation: UIM_VERSION_REQUIRE( ... ) [preprocessorErrorDirective] diff: 2.18.0 uim-chewing-0.1.0/src/chewing.c:104:9: style: Variable 'home' can be declared as pointer to const [constVariablePointer] 2.18.0 uim-chewing-0.1.0/src/chewing.c:115:12: warning: If memory allocation fails, then there is a possible null pointer dereference: hashpath [nullPointerOutOfMemory] uim-chewing-0.1.0/src/chewing.c:114:20: note: Assuming allocation function fails uim-chewing-0.1.0/src/chewing.c:114:20: note: Assignment 'hashpath=malloc(len+1)', assigned value is 0 uim-chewing-0.1.0/src/chewing.c:115:12: note: Null pointer dereference 2.18.0 uim-chewing-0.1.0/src/chewing.c:117:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CHEWING_DATADIR [valueFlowBailoutIncompleteVar] 2.18.0 uim-chewing-0.1.0/src/chewing.c:146:7: style: Unused variable: i [unusedVariable] 2.18.0 uim-chewing-0.1.0/src/chewing.c:147:7: style: Unused variable: selkey [unusedVariable] 2.18.0 uim-chewing-0.1.0/src/chewing.c:238:10: style: Unused variable: j [unusedVariable] 2.18.0 uim-chewing-0.1.0/src/chewing.c:242:16: style: Variable 'wclen' is assigned a value that is never used. [unreadVariable] 2.18.0 uim-chewing-0.1.0/src/chewing.c:266:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_CTYPE [valueFlowBailoutIncompleteVar] 2.18.0 uim-chewing-0.1.0/src/chewing.c:268:15: style: Condition 'wclen!=-1' is always true [knownConditionTrueFalse] 2.18.0 uim-chewing-0.1.0/src/chewing.c:269:7: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: wcs [nullPointerOutOfMemory] uim-chewing-0.1.0/src/chewing.c:265:17: note: Assuming allocation function fails uim-chewing-0.1.0/src/chewing.c:265:17: note: Assignment 'wcs=malloc(sizeof(wchar_t)*(chewing_buffer_Len(cc)+1))', assigned value is 0 uim-chewing-0.1.0/src/chewing.c:269:7: note: Null pointer dereference 2.18.0 uim-chewing-0.1.0/src/chewing.c:274:26: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: wcs [nullPointerOutOfMemory] uim-chewing-0.1.0/src/chewing.c:265:17: note: Assuming allocation function fails uim-chewing-0.1.0/src/chewing.c:265:17: note: Assignment 'wcs=malloc(sizeof(wchar_t)*(chewing_buffer_Len(cc)+1))', assigned value is 0 uim-chewing-0.1.0/src/chewing.c:274:26: note: Null pointer dereference 2.18.0 uim-chewing-0.1.0/src/chewing.c:277:9: error: Common realloc mistake: 'buf' nulled but not freed upon failure [memleakOnRealloc] 2.18.0 uim-chewing-0.1.0/src/chewing.c:341:2: error: Common realloc mistake: 'buf' nulled but not freed upon failure [memleakOnRealloc] 2.18.0 uim-chewing-0.1.0/src/chewing.c:390:9: style: Local variable 'len' shadows outer variable [shadowVariable] uim-chewing-0.1.0/src/chewing.c:238:13: note: Shadowed declaration uim-chewing-0.1.0/src/chewing.c:390:9: note: Shadow variable 2.18.0 uim-chewing-0.1.0/src/chewing.c:394:5: error: Common realloc mistake: 'buf' nulled but not freed upon failure [memleakOnRealloc] head uim-chewing-0.1.0/src/chewing.c:46:0: error: failed to evaluate #if condition, undefined function-like macro invocation: UIM_VERSION_REQUIRE( ... ) [preprocessorErrorDirective] head uim-chewing-0.1.0/src/chewing.c:46:2: error: failed to evaluate #if condition, undefined function-like macro invocation: UIM_VERSION_REQUIRE( ... ) [preprocessorErrorDirective] 2.18.0 uim-chewing-0.1.0/src/chewing.c:485:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable UMod_Shift [valueFlowBailoutIncompleteVar] 2.18.0 uim-chewing-0.1.0/src/chewing.c:645:7: style: Variable 'nth' is assigned a value that is never used. [unreadVariable] 2.18.0 uim-chewing-0.1.0/src/chewing.c:657:16: style: Unused variable: n [unusedVariable] DONE