2024-04-22 05:16 ftp://ftp.de.debian.org/debian/pool/main/s/sma/sma_1.4.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 -D__GNUC__ --platform=unix64 -j4 platform: Linux-6.1.0-20-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.56 compiler: g++ (Debian 12.2.0-14) 12.2.0 cppcheck: head 2.14.0 head-info: ea2e716 (2024-04-21 15:59:20 +0200) count: 145 145 elapsed-time: 3.9 3.9 head-timing-info: old-timing-info: head results: sma-1.4.orig/getopt.c:82:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:184:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:244:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:272:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:306:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:335:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:374:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:392:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:429:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:456:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/hash.c:487:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/init.c:75:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/ascii.c:50:9: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/ascii.c:51:6: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [prohibitedasctimeCalled] sma-1.4.orig/ascii.c:63:24: style: Condition '!hptr->inum' is always false [knownConditionTrueFalse] sma-1.4.orig/ascii.c:63:7: note: Assuming that condition '!hptr->inum' is not redundant sma-1.4.orig/ascii.c:63:24: note: Condition '!hptr->inum' is always false sma-1.4.orig/ascii.c:93:3: warning: %ld in format string (no. 2) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:94:3: warning: %ld in format string (no. 2) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:130:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:130:3: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:167:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:167:3: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:200:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:200:3: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:232:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:232:3: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:268:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:268:3: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:302:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:302:3: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:325:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:325:3: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:339:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:339:3: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:347:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/ascii.c:63:21: style: Same expression on both sides of '||'. [duplicateExpression] sma-1.4.orig/html.c:49:9: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/html.c:86:32: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [prohibitedasctimeCalled] sma-1.4.orig/html.c:97:32: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [prohibitedasctimeCalled] sma-1.4.orig/html.c:105:25: style: Condition '!hptr->inum' is always false [knownConditionTrueFalse] sma-1.4.orig/html.c:105:8: note: Assuming that condition '!hptr->inum' is not redundant sma-1.4.orig/html.c:105:25: note: Condition '!hptr->inum' is always false sma-1.4.orig/html.c:139:25: style: Condition '!hptr->inum' is always false [knownConditionTrueFalse] sma-1.4.orig/html.c:139:8: note: Assuming that condition '!hptr->inum' is not redundant sma-1.4.orig/html.c:139:25: note: Condition '!hptr->inum' is always false sma-1.4.orig/html.c:207:3: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:250:3: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:301:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:303:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:347:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:349:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:395:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:397:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:440:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:442:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:487:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:489:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:533:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:535:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:574:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:576:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:606:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:608:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:630:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/html.c:105:22: style: Same expression on both sides of '||'. [duplicateExpression] sma-1.4.orig/html.c:139:22: style: Same expression on both sides of '||'. [duplicateExpression] sma-1.4.orig/regex/engine.c:157:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_NOSUB [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:337:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CH [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:536:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_NOTBOL [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:716:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable OUT [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:809:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable OUT [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:912:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable OUT [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/regcomp.c:1111:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ptr [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:318:17: style: Variable 'tail' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/engine.c:324:17: style: Variable 'dp' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/engine.c:506:17: style: Variable 'ssp' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/engine.c:700:7: style: Parameter 'stop' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/engine.c:791:7: style: Parameter 'stop' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regerror.c:120:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_ITOA [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/regerror.c:121:17: style: Variable 's' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/regcomp.c:1596:4: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] sma-1.4.orig/regex/regcomp.c:810:17: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/regcomp.c:1144:17: style: Variable 'top' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/regcomp.c:1170:17: style: Variable 'top' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/regcomp.c:1200:16: style: Parameter 'cs' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1219:16: style: Parameter 'cs' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1240:16: style: Parameter 'cp' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1274:16: style: Parameter 'cs' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1290:16: style: Parameter 'cs' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1301:26: style: Parameter 'g' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1321:26: style: Parameter 'g' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1343:15: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1529:15: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1610:15: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/regcomp.c:1613:16: style: Variable 'scan' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/sma.c:148:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/sma.c:50:9: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/sma.c:461:17: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/sma.c:462:18: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/sma.c:241:12: style: Checking if unsigned expression 'lnum' is less than zero. [unsignedLessThanZero] sma-1.4.orig/sma.c:245:12: style: Checking if unsigned expression 'lnum' is less than zero. [unsignedLessThanZero] sma-1.4.orig/sma.c:247:13: style: Checking if unsigned expression 'lrnum' is less than zero. [unsignedLessThanZero] sma-1.4.orig/sma.c:250:12: style: Checking if unsigned expression 'rnum' is less than zero. [unsignedLessThanZero] sma-1.4.orig/sma.c:254:12: style: Checking if unsigned expression 'rnum' is less than zero. [unsignedLessThanZero] sma-1.4.orig/sma.c:256:13: style: Checking if unsigned expression 'rrnum' is less than zero. [unsignedLessThanZero] sma-1.4.orig/regex/engine.c:346:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable nope [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:682:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable nope [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:989:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable nope [valueFlowBailoutIncompleteVar] sma-1.4.orig/utils.c:525:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/utils.c:532:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/utils.c:548:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] sma-1.4.orig/utils.c:187:16: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] sma-1.4.orig/utils.c:139:14: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/utils.c:593:45: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/utils.c:646:45: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/utils.c:596:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/utils.c:598:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/utils.c:600:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/utils.c:636:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/utils.c:638:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/utils.c:640:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/utils.c:641:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sma-1.4.orig/utils.c:167:26: style: Same expression on both sides of '-'. [duplicateExpression] sma-1.4.orig/utils.c:450:22: style: Parameter 'hptr' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/utils.c:450:33: style: Parameter 'dd' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/utils.c:450:53: style: Parameter 'hh' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/utils.c:187:16: style: Variable 'p' is assigned a value that is never used. [unreadVariable] sma-1.4.orig/init.c:265:33: style: Redundant condition: The condition '*(str+1)' is redundant since '*(str+1) == '"'' is sufficient. [redundantCondition] sma-1.4.orig/init.c:40:8: style: Variable 'str1' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/init.c:40:15: style: Variable 'str2' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/parse.c:164:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] sma-1.4.orig/regex/engine.c:714:2: style: Redundant initialization for 'st'. The initialized value is overwritten before it is read. [redundantInitialization] sma-1.4.orig/regex/engine.c:704:21: note: st is initialized sma-1.4.orig/regex/engine.c:714:2: note: st is overwritten sma-1.4.orig/regex/engine.c:717:2: style: Redundant initialization for 'fresh'. The initialized value is overwritten before it is read. [redundantInitialization] sma-1.4.orig/regex/engine.c:705:24: note: fresh is initialized sma-1.4.orig/regex/engine.c:717:2: note: fresh is overwritten sma-1.4.orig/regex/engine.c:806:2: style: Redundant initialization for 'st'. The initialized value is overwritten before it is read. [redundantInitialization] sma-1.4.orig/regex/engine.c:795:21: note: st is initialized sma-1.4.orig/regex/engine.c:806:2: note: st is overwritten sma-1.4.orig/regex/engine.c:512:17: style: Variable 'cs' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/engine.c:796:18: style: Variable 'empty' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/engine.c:888:17: style: Parameter 'bef' can be declared as pointer to const [constParameterPointer] sma-1.4.orig/regex/engine.c:892:17: style: Variable 'cs' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/regex/engine.c:706:22: style: Variable 'tmp' is assigned a value that is never used. [unreadVariable] sma-1.4.orig/regex/engine.c:797:22: style: Variable 'tmp' is assigned a value that is never used. [unreadVariable] sma-1.4.orig/parse.c:325:17: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/parse.c:911:13: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] sma-1.4.orig/parse.c:929:17: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [prohibitedasctimeCalled] sma-1.4.orig/parse.c:546:26: style: Redundant condition: clsflag. '!clsflag || (clsflag && status==1)' is equivalent to '!clsflag || status==1' [redundantCondition] sma-1.4.orig/parse.c:90:17: style: Variable 'dsn' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/parse.c:90:23: style: Variable 'idptr' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/parse.c:91:8: style: Variable 'messageid' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/parse.c:761:14: style: Variable 'tmp2' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/parse.c:891:13: style: Variable 'tmptime' can be declared as pointer to const [constVariablePointer] sma-1.4.orig/parse.c:94:47: style: Variable 'actn' is assigned a value that is never used. [unreadVariable] diff: DONE