2024-04-18 12:41 ftp://ftp.de.debian.org/debian/pool/main/m/mathtex/mathtex_1.03.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 -j1 platform: Linux-5.15.0-102-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.13.0 head-info: c677fc8 (2024-04-18 09:26:10 +0200) count: 121 111 elapsed-time: 14.3 22.0 head-timing-info: old-timing-info: head results: mathtex-1.03/mathtex.c:657:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IRWXU [valueFlowBailoutIncompleteVar] mathtex-1.03/mathtex.c:1218:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IRWXU [valueFlowBailoutIncompleteVar] mathtex-1.03/mathtex.c:2066:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] mathtex-1.03/mathtex.c:2237:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] mathtex-1.03/mathtex.c:2832:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable segment [valueFlowBailoutIncompleteVar] mathtex-1.03/mathtex.c:3655:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] mathtex-1.03/mathtex.c:3718:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable isunescape [valueFlowBailoutIncompleteVar] mathtex-1.03/mathtex.c:1056:26: warning: Return value of function rand() is not used. [ignoredReturnValue] mathtex-1.03/mathtex.c:2191:22: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] mathtex-1.03/mathtex.c:3907:12: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] mathtex-1.03/mathtex.c:814:6: style: The if condition is the same as the previous if condition [duplicateCondition] mathtex-1.03/mathtex.c:809:6: note: First condition mathtex-1.03/mathtex.c:814:6: note: Second condition mathtex-1.03/mathtex.c:820:6: style: The if condition is the same as the previous if condition [duplicateCondition] mathtex-1.03/mathtex.c:814:6: note: First condition mathtex-1.03/mathtex.c:820:6: note: Second condition mathtex-1.03/mathtex.c:1518:13: style: The if condition is the same as the previous if condition [duplicateCondition] mathtex-1.03/mathtex.c:1509:13: note: First condition mathtex-1.03/mathtex.c:1518:13: note: Second condition mathtex-1.03/mathtex.c:1293:6: style: Condition '!iscompiletimelimit' is always false [knownConditionTrueFalse] mathtex-1.03/mathtex.c:1949:22: style: Condition 'iswindows' is always false [knownConditionTrueFalse] mathtex-1.03/mathtex.c:2634:10: style: Condition 'xlatectrl' is always true [knownConditionTrueFalse] mathtex-1.03/mathtex.c:2630:19: note: Assignment 'xlatectrl=1', assigned value is 1 mathtex-1.03/mathtex.c:2634:10: note: Condition 'xlatectrl' is always true mathtex-1.03/mathtex.c:2635:26: style: Condition '!xlateblank' is always true [knownConditionTrueFalse] mathtex-1.03/mathtex.c:2630:33: note: Assignment 'xlateblank=0', assigned value is 0 mathtex-1.03/mathtex.c:2635:26: note: Condition '!xlateblank' is always true mathtex-1.03/mathtex.c:3654:10: style: Condition '0&&msglevel>=99' is always false [knownConditionTrueFalse] mathtex-1.03/mathtex.c:3850:12: style: Condition '0&&!qcopy' is always false [knownConditionTrueFalse] mathtex-1.03/mathtex.c:2647:15: warning: Either the condition '(url)!=NULL' is redundant or there is possible null pointer dereference: url. [nullPointerRedundantCheck] mathtex-1.03/mathtex.c:2642:7: note: Assuming that condition '(url)!=NULL' is not redundant mathtex-1.03/mathtex.c:2647:15: note: Null pointer dereference mathtex-1.03/mathtex.c:3193:25: warning: Either the condition '(latexsym)!=NULL' is redundant or there is possible null pointer dereference: latexsym. [nullPointerRedundantCheck] mathtex-1.03/mathtex.c:3191:7: note: Assuming that condition '(latexsym)!=NULL' is not redundant mathtex-1.03/mathtex.c:3193:25: note: Null pointer dereference mathtex-1.03/mathtex.c:3152:21: style: Redundant initialization for 'wstrlen'. The initialized value is overwritten before it is read. [redundantInitialization] mathtex-1.03/mathtex.c:3140:10: note: wstrlen is initialized mathtex-1.03/mathtex.c:3152:21: note: wstrlen is overwritten mathtex-1.03/mathtex.c:3153:9: style: Redundant initialization for 'istag'. The initialized value is overwritten before it is read. [redundantInitialization] mathtex-1.03/mathtex.c:3143:8: note: istag is initialized mathtex-1.03/mathtex.c:3153:9: note: istag is overwritten mathtex-1.03/mathtex.c:3154:9: style: Redundant initialization for 'isamp'. The initialized value is overwritten before it is read. [redundantInitialization] mathtex-1.03/mathtex.c:3144:8: note: isamp is initialized mathtex-1.03/mathtex.c:3154:9: note: isamp is overwritten mathtex-1.03/mathtex.c:840:29: style: Checking if unsigned expression 'strlen(expression)' is less than zero. [unsignedLessThanZero] mathtex-1.03/mathtex.c:672:7: style: Variable 'copyright1' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:678:3: style: Variable 'copyright2' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:681:7: style: Variable 'usage1' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:688:3: style: Variable 'usage2' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:703:7: style: Variable 'invalid_referer_msg' can be declared as const array [constVariable] mathtex-1.03/mathtex.c:731:7: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:734:11: style: Variable 'host' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:735:6: style: Variable 'name' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:735:37: style: Variable 'addr' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:870:9: style: Variable 'pathsource' can be declared as const array [constVariable] mathtex-1.03/mathtex.c:928:9: style: Variable 'path' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:999:7: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1120:3: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1487:5: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1498:7: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1507:5: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1516:5: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1525:5: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1563:24: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:1727:9: style: Variable 'displaystring' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1809:45: style: Parameter 'message' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:1868:21: style: Parameter 'expression' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:1877:7: style: Variable 'dashes' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:1927:24: style: Parameter 'path' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:1927:48: style: Parameter 'extension' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:1983:23: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2006:23: style: Parameter 'dirname' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2098:26: style: Parameter 'program' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2159:16: style: Variable 'entry' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:2239:16: style: Variable 'buffptr' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:2304:27: style: Parameter 'cachefile' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2422:17: style: Parameter 'X' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2426:17: style: Parameter 'X' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2430:17: style: Parameter 'X' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2434:17: style: Parameter 'X' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2462:43: style: Parameter 'data' can be declared as const array [constParameter] mathtex-1.03/mathtex.c:2629:18: style: Variable 'hex' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:2635:13: style: Variable 'ctrlchars' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:2657:16: style: Parameter 'what' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2700:21: style: Parameter 'command' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2817:42: style: Parameter 'directive' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:2931:8: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3159:7: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3191:7: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3268:51: style: Parameter 'white' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:3384:38: style: Parameter 'from' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:3447:49: style: Parameter 'to' can be declared as pointer to const [constParameterPointer] mathtex-1.03/mathtex.c:3499:18: style: Variable 'snipptr' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3501:3: style: Variable 'strstrptr' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3562:1: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3634:1: style: Variable 'thissource' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3889:12: style: Variable 'tmstruct' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:3895:14: style: Variable 'daynames' can be declared as const array [constVariable] mathtex-1.03/mathtex.c:3897:14: style: Variable 'monthnames' can be declared as const array [constVariable] mathtex-1.03/mathtex.c:4057:12: style: Variable 'modays' can be declared as const array [constVariable] mathtex-1.03/mathtex.c:5595:5: style: Variable 'imagesizes' can be declared as const array [constVariable] mathtex-1.03/mathtex.c:5599:5: style: Variable 'imagetypes' can be declared as const array [constVariable] mathtex-1.03/mathtex.c:5626:18: style: Variable 'string' can be declared as pointer to const [constVariablePointer] mathtex-1.03/mathtex.c:755:7: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:775:10: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:791:7: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:810:9: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:816:11: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:930:3: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1046:1: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1346:7: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1882:7: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1948:9: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1953:10: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1957:9: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1958:11: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1963:7: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:2013:9: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:2070:1: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:2123:3: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:2642:7: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:2898:7: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:2913:16: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:2921:17: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3143:11: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3144:11: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3153:12: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3154:12: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3168:10: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3213:1: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3636:1: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3645:3: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3733:11: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3744:10: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3745:10: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3748:12: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3768:5: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3821:8: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:3837:32: warning: String literal compared with variable 'NULL'. Did you intend to use strcmp() instead? [literalWithCharPtrCompare] mathtex-1.03/mathtex.c:1739:32: style: Variable 'isnegfmt' is assigned a value that is never used. [unreadVariable] mathtex-1.03/mathtex.c:3273:14: style: Variable 'psubstr' is assigned a value that is never used. [unreadVariable] diff: head mathtex-1.03/mathtex.c:1218:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IRWXU [valueFlowBailoutIncompleteVar] head mathtex-1.03/mathtex.c:2066:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] head mathtex-1.03/mathtex.c:2237:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] head mathtex-1.03/mathtex.c:2462:43: style: Parameter 'data' can be declared as const array [constParameter] head mathtex-1.03/mathtex.c:2832:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable segment [valueFlowBailoutIncompleteVar] head mathtex-1.03/mathtex.c:3654:10: style: Condition '0&&msglevel>=99' is always false [knownConditionTrueFalse] head mathtex-1.03/mathtex.c:3655:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] head mathtex-1.03/mathtex.c:3718:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable isunescape [valueFlowBailoutIncompleteVar] head mathtex-1.03/mathtex.c:3850:12: style: Condition '0&&!qcopy' is always false [knownConditionTrueFalse] head mathtex-1.03/mathtex.c:3889:12: style: Variable 'tmstruct' can be declared as pointer to const [constVariablePointer] DONE