2026-05-01 20:36 ftp://ftp.de.debian.org/debian/pool/main/f/filter/filter_2.6.3+ds1.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 -j6 platform: Linux-7.0.3+deb14-amd64-x86_64-with-glibc2.42 python: 3.13.12 client-version: 1.4.0 compiler: g++ (Debian 15.2.0-17) 15.2.0 cppcheck: head 2.20.0 head-info: e5c4a734 (2026-05-01 11:10:43 +0200) count: 92 69 elapsed-time: 0.5 0.3 head-timing-info: old-timing-info: head results: filter2.6.3/istrcmp.c:40:16: style: Parameter 's1' can be declared as pointer to const [constParameterPointer] filter2.6.3/istrcmp.c:40:21: style: Parameter 's2' can be declared as pointer to const [constParameterPointer] filter2.6.3/mk_lockname.c:41:7: style: Parameter 'file_to_lock' can be declared as pointer to const [constParameterPointer] filter2.6.3/audit.c:58:37: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/audit.c:75:37: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/actions.c:200:1: portability: Omitted return type of function 'mail_message' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] filter2.6.3/filter.c:153:1: portability: Omitted return type of function 'main' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] filter2.6.3/lock.c:118:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_WRLCK [valueFlowBailoutIncompleteVar] filter2.6.3/lock.c:173:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_UNLCK [valueFlowBailoutIncompleteVar] filter2.6.3/lock.c:265:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] filter2.6.3/lock.c:380:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] filter2.6.3/actions.c:316:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_APPEND [valueFlowBailoutIncompleteVar] filter2.6.3/actions.c:461:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_APPEND [valueFlowBailoutIncompleteVar] filter2.6.3/actions.c:578:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_APPEND [valueFlowBailoutIncompleteVar] filter2.6.3/lock.c:187:11: style: Condition 'flockret' is always false [knownConditionTrueFalse] filter2.6.3/lock.c:162:13: note: Assignment 'flockret=0', assigned value is 0 filter2.6.3/lock.c:187:11: note: Condition 'flockret' is always false filter2.6.3/lock.c:184:3: style: Variable 'errno' is assigned an expression that holds the same value. [redundantAssignment] filter2.6.3/lock.c:180:11: note: fcntlerr is assigned 'errno' here. filter2.6.3/lock.c:184:3: note: Variable 'errno' is assigned an expression that holds the same value. filter2.6.3/lock.c:200:24: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer] filter2.6.3/lock.c:250:7: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer] filter2.6.3/lock.c:331:7: style: Parameter 'foldername' can be declared as pointer to const [constParameterPointer] filter2.6.3/lock.c:357:8: style: Variable 'slash' can be declared as pointer to const [constVariablePointer] filter2.6.3/filter.c:117:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] filter2.6.3/filter.c:178:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] filter2.6.3/filter.c:577:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] filter2.6.3/strtokq.c:14:16: style: Parameter 'keys' can be declared as pointer to const [constParameterPointer] filter2.6.3/rules.c:132:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] filter2.6.3/actions.c:549:3: warning: Return value of function dup() is not used. [ignoredReturnValue] filter2.6.3/actions.c:616:16: warning: Either the condition '(mailunit=open(mailbox,O_APPEND|O_WRONLY|O_CREAT,0600))<0' is redundant or fdopen() argument nr 1 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg] filter2.6.3/actions.c:586:72: note: Assuming that condition '(mailunit=open(mailbox,O_APPEND|O_WRONLY|O_CREAT,0600))<0' is not redundant filter2.6.3/actions.c:616:16: note: Invalid argument filter2.6.3/actions.c:491:10: warning: If resource allocation fails, then there is a possible null pointer dereference: folderfptr [nullPointerOutOfResources] filter2.6.3/actions.c:470:21: note: Assuming allocation function fails filter2.6.3/actions.c:470:21: note: Assignment 'folderfptr=fdopen(fdunit,"a")', assigned value is 0 filter2.6.3/actions.c:472:48: note: Assuming condition is false filter2.6.3/actions.c:491:10: note: Null pointer dereference filter2.6.3/actions.c:493:9: warning: If resource allocation fails, then there is a possible null pointer dereference: folderfptr [nullPointerOutOfResources] filter2.6.3/actions.c:470:21: note: Assuming allocation function fails filter2.6.3/actions.c:470:21: note: Assignment 'folderfptr=fdopen(fdunit,"a")', assigned value is 0 filter2.6.3/actions.c:472:48: note: Assuming condition is false filter2.6.3/actions.c:493:9: note: Null pointer dereference filter2.6.3/actions.c:393:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] filter2.6.3/actions.c:392:11: note: ret is assigned filter2.6.3/actions.c:393:11: note: ret is overwritten filter2.6.3/actions.c:102:7: style: Parameter 'address' can be declared as pointer to const [constParameterPointer] filter2.6.3/actions.c:501:7: style: Parameter 'command' can be declared as pointer to const [constParameterPointer] filter2.6.3/actions.c:106:6: style: Unused variable: statusp [unusedVariable] filter2.6.3/utils.c:112:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] filter2.6.3/utils.c:363:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] filter2.6.3/utils.c:262:5: style:inconclusive: Function 'itoa' argument 1 names different: declaration '' definition 'i'. [funcArgNamesDifferentUnnamed] filter2.6.3/utils.c:262:8: style:inconclusive: Function 'itoa' argument 2 names different: declaration '' definition 'two_digit'. [funcArgNamesDifferentUnnamed] filter2.6.3/utils.c:65:7: style: Parameter 'reason' can be declared as pointer to const [constParameterPointer] filter2.6.3/utils.c:85:7: style: Parameter 'listing' can be declared as pointer to const [constParameterPointer] filter2.6.3/utils.c:296:35: style: Parameter 'src' can be declared as pointer to const [constParameterPointer] filter2.6.3/rules.c:388:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/rules.c:398:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/rules.c:408:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/rules.c:418:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/rules.c:428:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/rules.c:440:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/rules.c:450:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] filter2.6.3/rules.c:157:7: style:inconclusive: Function 'regerror' argument 1 names different: declaration '' definition 's'. [funcArgNamesDifferentUnnamed] filter2.6.3/rules.c:325:42: style: Local variable 'regsub' shadows outer function [shadowFunction] filter2.6.3/regexp.h:44:13: note: Shadowed declaration filter2.6.3/rules.c:325:42: note: Shadow variable filter2.6.3/rules.c:157:7: style: Parameter 's' can be declared as pointer to const [constParameterPointer] filter2.6.3/rules.c:172:23: style: Parameter 'cond' can be declared as pointer to const [constParameterPointer] filter2.6.3/rules.c:297:7: style: Parameter 'word' can be declared as pointer to const [constParameterPointer] filter2.6.3/rules.c:481:15: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] filter2.6.3/rules.c:482:15: style: Variable 'ep' can be declared as pointer to const [constVariablePointer] filter2.6.3/rules.c:526:26: style: Variable 'cond' can be declared as pointer to const [constVariablePointer] filter2.6.3/filter.c:186:22: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] filter2.6.3/filter.c:190:19: warning: Either the condition '(passwd_entry=getpwuid(getuid()))==NULL' is redundant or there is possible null pointer dereference: passwd_entry. [nullPointerRedundantCheck] filter2.6.3/filter.c:186:42: note: Assuming that condition '(passwd_entry=getpwuid(getuid()))==NULL' is not redundant filter2.6.3/filter.c:190:19: note: Null pointer dereference filter2.6.3/filter.c:191:23: warning: Either the condition '(passwd_entry=getpwuid(getuid()))==NULL' is redundant or there is possible null pointer dereference: passwd_entry. [nullPointerRedundantCheck] filter2.6.3/filter.c:186:42: note: Assuming that condition '(passwd_entry=getpwuid(getuid()))==NULL' is not redundant filter2.6.3/filter.c:191:23: note: Null pointer dereference filter2.6.3/filter.c:193:13: warning: Either the condition '(passwd_entry=getpwuid(getuid()))==NULL' is redundant or there is possible null pointer dereference: passwd_entry. [nullPointerRedundantCheck] filter2.6.3/filter.c:186:42: note: Assuming that condition '(passwd_entry=getpwuid(getuid()))==NULL' is not redundant filter2.6.3/filter.c:193:13: note: Null pointer dereference filter2.6.3/filter.c:194:13: warning: Either the condition '(passwd_entry=getpwuid(getuid()))==NULL' is redundant or there is possible null pointer dereference: passwd_entry. [nullPointerRedundantCheck] filter2.6.3/filter.c:186:42: note: Assuming that condition '(passwd_entry=getpwuid(getuid()))==NULL' is not redundant filter2.6.3/filter.c:194:13: note: Null pointer dereference filter2.6.3/regexp.c:244:7: style:inconclusive: Function 'regcomp' argument 1 names different: declaration '' definition 'exp'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:331:5: style:inconclusive: Function 'reg' argument 1 names different: declaration '' definition 'paren'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:332:6: style:inconclusive: Function 'reg' argument 2 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:403:6: style:inconclusive: Function 'regbranch' argument 1 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:442:6: style:inconclusive: Function 'regpiece' argument 1 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:506:6: style:inconclusive: Function 'regatom' argument 1 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:613:6: style:inconclusive: Function 'regnode' argument 1 names different: declaration '' definition 'op'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:638:6: style:inconclusive: Function 'regc' argument 1 names different: declaration '' definition 'b'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:653:6: style:inconclusive: Function 'reginsert' argument 1 names different: declaration '' definition 'op'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:654:7: style:inconclusive: Function 'reginsert' argument 2 names different: declaration '' definition 'opnd'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:682:7: style:inconclusive: Function 'regtail' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:683:7: style:inconclusive: Function 'regtail' argument 2 names different: declaration '' definition 'val'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:714:7: style:inconclusive: Function 'regoptail' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:715:7: style:inconclusive: Function 'regoptail' argument 2 names different: declaration '' definition 'val'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:753:18: style:inconclusive: Function 'regexec' argument 1 names different: declaration '' definition 'prog'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:754:16: style:inconclusive: Function 'regexec' argument 2 names different: declaration '' definition 'string'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:814:9: style:inconclusive: Function 'regtry' argument 1 names different: declaration '' definition 'prog'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:815:7: style:inconclusive: Function 'regtry' argument 2 names different: declaration '' definition 'string'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:851:7: style:inconclusive: Function 'regmatch' argument 1 names different: declaration '' definition 'prog'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:1035:7: style:inconclusive: Function 'regrepeat' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] filter2.6.3/regexp.c:1081:16: style:inconclusive: Function 'regnext' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] filter2.6.3/filter.c:263:9: style: Variable 'tmpstr' can be declared as pointer to const [constVariablePointer] filter2.6.3/filter.c:540:15: style: Variable 'base' can be declared as pointer to const [constVariablePointer] filter2.6.3/filter.c:544:14: style: Variable 'src' can be declared as pointer to const [constVariablePointer] filter2.6.3/regexp.c:683:7: style: Parameter 'val' can be declared as pointer to const [constParameterPointer] filter2.6.3/filter.c:772:7: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] filter2.6.3/regexp.c:884:20: style: Variable 'opnd' can be declared as pointer to const [constVariablePointer] filter2.6.3/regexp.c:1039:17: style: Variable 'opnd' can be declared as pointer to const [constVariablePointer] filter2.6.3/regexp.c:276:12: error: Memory is allocated but not initialized: r [uninitdata] filter2.6.3/filter.c:547:6: style: Variable 'chunklen' is assigned a value that is never used. [unreadVariable] filter2.6.3/filter.c:549:7: style: Unused variable: enc_bytes [unusedVariable] filter2.6.3/parse.c:202:4: error: Resource leak: fd [resourceLeak] diff: 2.20.0 filter2.6.3/actions.c:482:17: warning: If resource allocation fails, then there is a possible null pointer dereference: folderfptr [nullPointerOutOfResources] filter2.6.3/actions.c:470:21: note: Assuming allocation function fails filter2.6.3/actions.c:470:21: note: Assignment 'folderfptr=fdopen(fdunit,"a")', assigned value is 0 filter2.6.3/actions.c:482:17: note: Null pointer dereference head filter2.6.3/actions.c:491:10: warning: If resource allocation fails, then there is a possible null pointer dereference: folderfptr [nullPointerOutOfResources] filter2.6.3/actions.c:470:21: note: Assuming allocation function fails filter2.6.3/actions.c:470:21: note: Assignment 'folderfptr=fdopen(fdunit,"a")', assigned value is 0 filter2.6.3/actions.c:472:48: note: Assuming condition is false filter2.6.3/actions.c:491:10: note: Null pointer dereference 2.20.0 filter2.6.3/actions.c:491:10: warning: If resource allocation fails, then there is a possible null pointer dereference: folderfptr [nullPointerOutOfResources] filter2.6.3/actions.c:470:21: note: Assuming allocation function fails filter2.6.3/actions.c:470:21: note: Assignment 'folderfptr=fdopen(fdunit,"a")', assigned value is 0 filter2.6.3/actions.c:491:10: note: Null pointer dereference head filter2.6.3/actions.c:493:9: warning: If resource allocation fails, then there is a possible null pointer dereference: folderfptr [nullPointerOutOfResources] filter2.6.3/actions.c:470:21: note: Assuming allocation function fails filter2.6.3/actions.c:470:21: note: Assignment 'folderfptr=fdopen(fdunit,"a")', assigned value is 0 filter2.6.3/actions.c:472:48: note: Assuming condition is false filter2.6.3/actions.c:493:9: note: Null pointer dereference 2.20.0 filter2.6.3/actions.c:493:9: warning: If resource allocation fails, then there is a possible null pointer dereference: folderfptr [nullPointerOutOfResources] filter2.6.3/actions.c:470:21: note: Assuming allocation function fails filter2.6.3/actions.c:470:21: note: Assignment 'folderfptr=fdopen(fdunit,"a")', assigned value is 0 filter2.6.3/actions.c:493:9: note: Null pointer dereference head filter2.6.3/regexp.c:1035:7: style:inconclusive: Function 'regrepeat' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:1081:16: style:inconclusive: Function 'regnext' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:244:7: style:inconclusive: Function 'regcomp' argument 1 names different: declaration '' definition 'exp'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:331:5: style:inconclusive: Function 'reg' argument 1 names different: declaration '' definition 'paren'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:332:6: style:inconclusive: Function 'reg' argument 2 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:403:6: style:inconclusive: Function 'regbranch' argument 1 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:442:6: style:inconclusive: Function 'regpiece' argument 1 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:506:6: style:inconclusive: Function 'regatom' argument 1 names different: declaration '' definition 'flagp'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:613:6: style:inconclusive: Function 'regnode' argument 1 names different: declaration '' definition 'op'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:638:6: style:inconclusive: Function 'regc' argument 1 names different: declaration '' definition 'b'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:653:6: style:inconclusive: Function 'reginsert' argument 1 names different: declaration '' definition 'op'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:654:7: style:inconclusive: Function 'reginsert' argument 2 names different: declaration '' definition 'opnd'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:682:7: style:inconclusive: Function 'regtail' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:683:7: style:inconclusive: Function 'regtail' argument 2 names different: declaration '' definition 'val'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:714:7: style:inconclusive: Function 'regoptail' argument 1 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:715:7: style:inconclusive: Function 'regoptail' argument 2 names different: declaration '' definition 'val'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:753:18: style:inconclusive: Function 'regexec' argument 1 names different: declaration '' definition 'prog'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:754:16: style:inconclusive: Function 'regexec' argument 2 names different: declaration '' definition 'string'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:814:9: style:inconclusive: Function 'regtry' argument 1 names different: declaration '' definition 'prog'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:815:7: style:inconclusive: Function 'regtry' argument 2 names different: declaration '' definition 'string'. [funcArgNamesDifferentUnnamed] head filter2.6.3/regexp.c:851:7: style:inconclusive: Function 'regmatch' argument 1 names different: declaration '' definition 'prog'. [funcArgNamesDifferentUnnamed] head filter2.6.3/rules.c:157:7: style:inconclusive: Function 'regerror' argument 1 names different: declaration '' definition 's'. [funcArgNamesDifferentUnnamed] head filter2.6.3/utils.c:262:5: style:inconclusive: Function 'itoa' argument 1 names different: declaration '' definition 'i'. [funcArgNamesDifferentUnnamed] head filter2.6.3/utils.c:262:8: style:inconclusive: Function 'itoa' argument 2 names different: declaration '' definition 'two_digit'. [funcArgNamesDifferentUnnamed] DONE