2022-06-30 21:11 ftp://ftp.de.debian.org/debian/pool/main/s/sdop/sdop_0.90.orig.tar.bz2 cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j1 platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.25 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 27578e9 (2022-06-30 13:50:31 +0200) count: 45 45 elapsed-time: 383.6 363.2 head-timing-info: Tokenizer::simplifyTokens1: 382.5s (avg. 11.5909s - 33 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 380.776s (avg. 11.5387s - 33 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.675108s (avg. 0.0204578s - 33 result(s)) Tokenizer::createTokens: 0.234903s (avg. 0.00711827s - 33 result(s)) Tokenizer::tokenize::simplifyTypedef: 0.216202s (avg. 0.00655158s - 33 result(s)) Overall time: 765.285s old-timing-info: Tokenizer::simplifyTokens1: 362.189s (avg. 10.9754s - 33 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 360.401s (avg. 10.9213s - 33 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.720479s (avg. 0.0218327s - 33 result(s)) Tokenizer::createTokens: 0.245787s (avg. 0.00744809s - 33 result(s)) Tokenizer::tokenize::simplifyTypedef: 0.219285s (avg. 0.006645s - 33 result(s)) Overall time: 724.627s head results: sdop-0.90/src/buildhy.c:37:37: style: Parameter 'storefile' can be declared as pointer to const [constParameter] sdop-0.90/src/debug.c:368:41: style: Parameter 'last_item' can be declared as pointer to const [constParameter] sdop-0.90/src/error.c:223:40: error: va_list 'ap' was opened but not closed by va_end(). [va_end_missing] sdop-0.90/src/font.c:115:16: style: Redundant condition: If 'EXPR == ' '', the comparison 'EXPR != 0' is always true. [redundantCondition] sdop-0.90/src/font.c:277:17: style: Redundant condition: If 'EXPR == ' '', the comparison 'EXPR != 0' is always true. [redundantCondition] sdop-0.90/src/font.c:311:19: style: Redundant condition: If 'EXPR == ' '', the comparison 'EXPR != 0' is always true. [redundantCondition] sdop-0.90/src/font.c:325:21: style: Redundant condition: If 'EXPR == ' '', the comparison 'EXPR != 0' is always true. [redundantCondition] sdop-0.90/src/hytest.c:120:9: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] sdop-0.90/src/index.c:111:8: warning: Either the condition 'f==NULL' is redundant or there is possible null pointer dereference: f. [nullPointerRedundantCheck] sdop-0.90/src/index.c:105:7: note: Assuming that condition 'f==NULL' is not redundant sdop-0.90/src/index.c:111:8: note: Null pointer dereference sdop-0.90/src/index.c:611:26: warning: Redundant assignment of 'c' to itself. [selfAssignment] sdop-0.90/src/page.c:264:11: warning: Either the condition 'rcount>=1024' is redundant or the array 'ritems[1024]' is accessed at index 1024, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/page.c:263:16: note: Assuming that condition 'rcount>=1024' is not redundant sdop-0.90/src/page.c:264:11: note: Array index out of bounds sdop-0.90/src/page.c:265:10: warning: Either the condition 'rcount>=1024' is redundant or the array 'rseps[1024]' is accessed at index 1024, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/page.c:263:16: note: Assuming that condition 'rcount>=1024' is not redundant sdop-0.90/src/page.c:265:10: note: Array index out of bounds sdop-0.90/src/page.c:266:12: warning: Either the condition 'rcount>=1024' is redundant or the array 'rdepths[1024]' is accessed at index 1024, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/page.c:263:16: note: Assuming that condition 'rcount>=1024' is not redundant sdop-0.90/src/page.c:266:12: note: Array index out of bounds sdop-0.90/src/page.c:267:21: warning: Either the condition 'rcount>=1024' is redundant or the array 'rdepths[1024]' is accessed at index 1024, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/page.c:263:16: note: Assuming that condition 'rcount>=1024' is not redundant sdop-0.90/src/page.c:267:21: note: Array index out of bounds sdop-0.90/src/page.c:352:23: warning: Either the condition 'tbody!=NULL' is redundant or there is possible null pointer dereference: tbody. [nullPointerRedundantCheck] sdop-0.90/src/page.c:401:11: note: Assuming that condition 'tbody!=NULL' is not redundant sdop-0.90/src/page.c:352:23: note: Null pointer dereference sdop-0.90/src/page.c:661:11: warning: Either the condition 'ipp==NULL' is redundant or there is possible null pointer dereference: ipp. [nullPointerRedundantCheck] sdop-0.90/src/page.c:652:9: note: Assuming that condition 'ipp==NULL' is not redundant sdop-0.90/src/page.c:661:11: note: Null pointer dereference sdop-0.90/src/page.c:862:8: warning: Either the condition 'pp==NULL' is redundant or there is possible null pointer dereference: pp. [nullPointerRedundantCheck] sdop-0.90/src/page.c:861:10: note: Assuming that condition 'pp==NULL' is not redundant sdop-0.90/src/page.c:862:8: note: Null pointer dereference sdop-0.90/src/para.c:603:12: warning: Either the condition 'list_nest_depth>=10' is redundant or the array 'lpstack[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/para.c:602:25: note: Assuming that condition 'list_nest_depth>=10' is not redundant sdop-0.90/src/para.c:603:12: note: Array index out of bounds sdop-0.90/src/para.c:626:12: warning: Either the condition 'list_nest_depth>=10' is redundant or the array 'lpstack[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/para.c:625:25: note: Assuming that condition 'list_nest_depth>=10' is not redundant sdop-0.90/src/para.c:626:12: note: Array index out of bounds sdop-0.90/src/para.c:649:12: warning: Either the condition 'list_nest_depth>=10' is redundant or the array 'lpstack[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/para.c:648:25: note: Assuming that condition 'list_nest_depth>=10' is not redundant sdop-0.90/src/para.c:649:12: note: Array index out of bounds sdop-0.90/src/para.c:660:12: warning: Either the condition 'list_nest_depth>=10' is redundant or the array 'lpstack[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/para.c:659:25: note: Assuming that condition 'list_nest_depth>=10' is not redundant sdop-0.90/src/para.c:660:12: note: Array index out of bounds sdop-0.90/src/para.c:670:12: warning: Either the condition 'list_nest_depth>=10' is redundant or the array 'lpstack[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/para.c:669:25: note: Assuming that condition 'list_nest_depth>=10' is not redundant sdop-0.90/src/para.c:670:12: note: Array index out of bounds sdop-0.90/src/para.c:677:12: warning: Either the condition 'list_nest_depth>=10' is redundant or the array 'lpstack[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/para.c:676:25: note: Assuming that condition 'list_nest_depth>=10' is not redundant sdop-0.90/src/para.c:677:12: note: Array index out of bounds sdop-0.90/src/para.c:685:12: warning: Either the condition 'list_nest_depth>=10' is redundant or the array 'lpstack[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/para.c:684:25: note: Assuming that condition 'list_nest_depth>=10' is not redundant sdop-0.90/src/para.c:685:12: note: Array index out of bounds sdop-0.90/src/para.c:1180:8: warning: Either the condition 'tb==NULL' is redundant or there is possible null pointer dereference: tb. [nullPointerRedundantCheck] sdop-0.90/src/para.c:1173:10: note: Assuming that condition 'tb==NULL' is not redundant sdop-0.90/src/para.c:1180:8: note: Null pointer dereference sdop-0.90/src/para.c:2400:14: style: Variable 'olanchor' is assigned a value that is never used. [unreadVariable] sdop-0.90/src/read.c:538:30: style: Variable 'pp' is assigned a value that is never used. [unreadVariable] sdop-0.90/src/table.c:168:7: warning: Either the condition 'inext!=NULL' is redundant or there is possible null pointer dereference: inext. [nullPointerRedundantCheck] sdop-0.90/src/table.c:167:16: note: Assuming that condition 'inext!=NULL' is not redundant sdop-0.90/src/table.c:168:7: note: Null pointer dereference sdop-0.90/src/toc.c:166:10: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] sdop-0.90/src/toc.c:135:17: style: Variable 'is_section' is assigned a value that is never used. [unreadVariable] sdop-0.90/src/toc.c:136:15: style: Variable 'is_index' is assigned a value that is never used. [unreadVariable] sdop-0.90/src/write.c:2109:11: warning: Either the condition 'pcount>=32' is redundant or the array 'textsave[32]' is accessed at index 32, which is out of bounds. [arrayIndexOutOfBoundsCond] sdop-0.90/src/write.c:2106:14: note: Assuming that condition 'pcount>=32' is not redundant sdop-0.90/src/write.c:2109:11: note: Array index out of bounds sdop-0.90/src/write.c:1511:13: style: Condition 'instring' is always false [knownConditionTrueFalse] sdop-0.90/src/write.c:1461:23: note: Assignment 'instring=0', assigned value is 0 sdop-0.90/src/write.c:1511:13: note: Condition 'instring' is always false sdop-0.90/src/write.c:1531:13: style: Condition 'instring' is always false [knownConditionTrueFalse] sdop-0.90/src/write.c:1461:23: note: Assignment 'instring=0', assigned value is 0 sdop-0.90/src/write.c:1531:13: note: Condition 'instring' is always false sdop-0.90/src/write.c:2515:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sdop-0.90/src/write.c:2535:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sdop-0.90/src/write.c:2721:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sdop-0.90/src/write.c:2744:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sdop-0.90/src/write.c:2814:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sdop-0.90/src/write.c:2838:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sdop-0.90/src/write.c:1011:13: warning: Either the condition 'inext!=NULL' is redundant or there is possible null pointer dereference: inext. [nullPointerRedundantCheck] sdop-0.90/src/write.c:1010:22: note: Assuming that condition 'inext!=NULL' is not redundant sdop-0.90/src/write.c:1011:13: note: Null pointer dereference sdop-0.90/src/write.c:1557:27: warning: Either the condition 'tn==NULL' is redundant or there is possible null pointer dereference: tn. [nullPointerRedundantCheck] sdop-0.90/src/write.c:1555:16: note: Assuming that condition 'tn==NULL' is not redundant sdop-0.90/src/write.c:1557:27: note: Null pointer dereference sdop-0.90/src/write.c:1574:64: warning: Either the condition 'yp==NULL' is redundant or there is possible null pointer dereference: yp. [nullPointerRedundantCheck] sdop-0.90/src/write.c:1562:16: note: Assuming that condition 'yp==NULL' is not redundant sdop-0.90/src/write.c:1574:64: note: Null pointer dereference sdop-0.90/src/write.c:2576:8: warning: Either the condition 'ph==NULL' is redundant or there is possible null pointer dereference: ph. [nullPointerRedundantCheck] sdop-0.90/src/write.c:2573:8: note: Assuming that condition 'ph==NULL' is not redundant sdop-0.90/src/write.c:2576:8: note: Null pointer dereference sdop-0.90/src/write.c:379:1: error: va_list 'ap' was opened but not closed by va_end(). [va_end_missing] diff: head sdop-0.90/src/buildhy.c:37:37: style: Parameter 'storefile' can be declared as pointer to const [constParameter] 2.8 sdop-0.90/src/buildhy.c:37:37: style: Parameter 'storefile' can be declared with const [constParameter] head sdop-0.90/src/debug.c:368:41: style: Parameter 'last_item' can be declared as pointer to const [constParameter] 2.8 sdop-0.90/src/debug.c:368:41: style: Parameter 'last_item' can be declared with const [constParameter] DONE