2025-11-23 08:52 ftp://ftp.de.debian.org/debian/pool/main/p/pmount/pmount_0.9.23.orig.tar.bz2 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: cb76e52 (2025-11-22 14:47:37 +0100) count: 61 61 elapsed-time: 0.5 0.6 head-timing-info: old-timing-info: head results: pmount-0.9.23/src/luks.c:85:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/luks.c:110:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/luks.c:127:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOCKDIR [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/luks.c:138:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/luks.c:159:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/luks.c:175:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/luks.c:45:53: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/luks.c:65:63: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/luks.c:69:49: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/luks.c:74:34: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/luks.c:77:70: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/luks.c:98:49: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/pmount-hal.c:179:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount-hal.c:193:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount-hal.c:123:5: warning: If memory allocation fails, then there is a possible null pointer dereference: argv [nullPointerOutOfMemory] pmount-0.9.23/src/pmount-hal.c:118:46: note: Assuming allocation function fails pmount-0.9.23/src/pmount-hal.c:118:25: note: Assignment 'argv=(const char**)calloc(sizeof(const char*),addargc+15)', assigned value is 0 pmount-0.9.23/src/pmount-hal.c:123:5: note: Null pointer dereference pmount-0.9.23/src/pmount-hal.c:353:18: warning: If memory allocation fails, then there is a possible null pointer dereference: iocharset [nullPointerOutOfMemory] pmount-0.9.23/src/pmount-hal.c:351:24: note: Assuming allocation function fails pmount-0.9.23/src/pmount-hal.c:351:24: note: Assignment 'iocharset=strdup(s+10)', assigned value is 0 pmount-0.9.23/src/pmount-hal.c:353:18: note: Null pointer dereference pmount-0.9.23/src/pmount-hal.c:217:59: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/pmount-hal.c:43:20: style: Variable 'dirent' can be declared as pointer to const [constVariablePointer] pmount-0.9.23/src/pmount.c:143:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MEDIADIR [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount.c:289:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount.c:442:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MOUNT_NTFS_3G [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount.c:474:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOCKDIR [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount.c:537:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount.c:612:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MEDIADIR [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pmount.c:380:78: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/pmount.c:611:27: style: Variable 'arg2' can be declared as pointer to const [constVariablePointer] pmount-0.9.23/src/pmount.c:633:26: style: Variable 'long_opts' can be declared as const array [constVariable] pmount-0.9.23/src/policy.c:598:42: error: There is an unknown macro here somewhere. Configuration is required. If WHITELIST is a macro then please configure it. [unknownMacro] pmount-0.9.23/src/pumount.c:54:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MEDIADIR [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pumount.c:68:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pumount.c:162:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/pumount.c:234:9: error: Address of local auto-variable assigned to a function parameter. [autoVariables] pmount-0.9.23/src/pumount.c:241:13: error: Address of local auto-variable assigned to a function parameter. [autoVariables] pmount-0.9.23/src/pumount.c:77:9: style: Condition '!mntpt' is always false [knownConditionTrueFalse] pmount-0.9.23/src/pumount.c:142:23: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/pumount.c:145:23: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] pmount-0.9.23/src/pumount.c:170:26: style: Variable 'long_opts' can be declared as const array [constVariable] pmount-0.9.23/src/realpath.c:74:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/realpath.c:86:10: warning: If memory allocation fails, then there is a possible null pointer dereference: path [nullPointerOutOfMemory] pmount-0.9.23/src/realpath.c:146:17: note: Assuming allocation function fails pmount-0.9.23/src/realpath.c:146:17: note: Assignment 'buf=xmalloc(m+n+1)', assigned value is 0 pmount-0.9.23/src/realpath.c:149:11: note: Assignment 'path=buf', assigned value is 0 pmount-0.9.23/src/realpath.c:86:10: note: Null pointer dereference pmount-0.9.23/src/realpath.c:147:11: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] pmount-0.9.23/src/realpath.c:146:17: note: Assuming allocation function fails pmount-0.9.23/src/realpath.c:146:17: note: Assignment 'buf=xmalloc(m+n+1)', assigned value is 0 pmount-0.9.23/src/realpath.c:147:11: note: Null pointer dereference pmount-0.9.23/src/realpath.c:148:15: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] pmount-0.9.23/src/realpath.c:146:17: note: Assuming allocation function fails pmount-0.9.23/src/realpath.c:146:17: note: Assignment 'buf=xmalloc(m+n+1)', assigned value is 0 pmount-0.9.23/src/realpath.c:148:15: note: Null pointer addition pmount-0.9.23/src/realpath.c:61:61: style:inconclusive: Function 'private_realpath' argument 3 names different: declaration 'm' definition 'maxreslth'. [funcArgNamesDifferent] pmount-0.9.23/src/realpath.h:4:74: note: Function 'private_realpath' argument 3 names different: declaration 'm' definition 'maxreslth'. pmount-0.9.23/src/realpath.c:61:61: note: Function 'private_realpath' argument 3 names different: declaration 'm' definition 'maxreslth'. pmount-0.9.23/src/utils.c:98:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:196:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:220:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:310:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:345:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:383:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:413:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:426:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] pmount-0.9.23/src/utils.c:411:9: error: Resource leak: f [resourceLeak] pmount-0.9.23/src/utils.c:415:5: error: Resource leak: f [resourceLeak] pmount-0.9.23/src/utils.c:440:1: error: Resource leak: f [resourceLeak] pmount-0.9.23/src/utils.c:144:20: style: Variable 'dirent' can be declared as pointer to const [constVariablePointer] pmount-0.9.23/src/utils.c:398:11: style: Variable 'lockfile' can be declared as pointer to const [constVariablePointer] pmount-0.9.23/src/utils.c:421:11: style: Variable 'lockfile' can be declared as pointer to const [constVariablePointer] pmount-0.9.23/tests/test_policy.c:28:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pmount-0.9.23/tests/test_policy.c:74:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable enable_debug [valueFlowBailoutIncompleteVar] pmount-0.9.23/tests/test_policy.c:73:16: style: Unused variable: value [unusedVariable] pmount-0.9.23/tests/test_sysfs.c:49:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pmount-0.9.23/tests/test_sysfs.c:71:7: warning: fprintf format string requires 0 parameters but 1 is given. [wrongPrintfScanfArgNum] diff: DONE