2022-06-25 16:45 ftp://ftp.de.debian.org/debian/pool/main/u/unrtf/unrtf_0.21.10-clean.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --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.24 compiler: g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 cppcheck: head 2.8 head-info: d204c5f (2022-06-25 17:09:51 +0200) count: 35 35 elapsed-time: 6.1 8.0 head-timing-info: Tokenizer::simplifyTokens1: 1.84907s (avg. 0.123272s - 15 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 1.65416s (avg. 0.110277s - 15 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.100904s (avg. 0.00672693s - 15 result(s)) Tokenizer::createTokens: 0.031137s (avg. 0.0020758s - 15 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.028835s (avg. 0.00192233s - 15 result(s)) Overall time: 3.77019s old-timing-info: Tokenizer::simplifyTokens1: 2.4672s (avg. 0.16448s - 15 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 2.27469s (avg. 0.151646s - 15 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.099561s (avg. 0.0066374s - 15 result(s)) Tokenizer::createTokens: 0.03442s (avg. 0.00229467s - 15 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.029715s (avg. 0.001981s - 15 result(s)) Overall time: 5.00576s head results: unrtf-0.21.10/Windows/unrtf_w.c:87:22: style: Variable 'length' is assigned a value that is never used. [unreadVariable] unrtf-0.21.10/src/attr.c:917:50: style: Redundant condition: string[i]=='%'. 'A || (!A && B)' is equivalent to 'A || B' [redundantCondition] unrtf-0.21.10/src/attr.c:937:26: style: Redundant condition: string[i]=='\\'. 'string[i]!='\\' || (string[i]=='\\' && string[i+1]!='%')' is equivalent to 'string[i]!='\\' || string[i+1]!='%'' [redundantCondition] unrtf-0.21.10/src/attr.c:939:26: style: Redundant condition: string[i]=='%'. 'A || (!A && B)' is equivalent to 'A || B' [redundantCondition] unrtf-0.21.10/src/attr.c:977:49: style: Redundant condition: string[i]=='%'. 'A || (!A && B)' is equivalent to 'A || B' [redundantCondition] unrtf-0.21.10/src/attr.c:996:26: style: Redundant condition: string[i]=='\\'. 'string[i]!='\\' || (string[i]=='\\' && string[i+1]!='%')' is equivalent to 'string[i]!='\\' || string[i+1]!='%'' [redundantCondition] unrtf-0.21.10/src/attr.c:998:26: style: Redundant condition: string[i]=='%'. 'A || (!A && B)' is equivalent to 'A || B' [redundantCondition] unrtf-0.21.10/src/attr.c:520:8: style: Unused variable: oldparam [unusedVariable] unrtf-0.21.10/src/convert.c:1232:10: style: Condition 'nextword' is always true [knownConditionTrueFalse] unrtf-0.21.10/src/convert.c:2586:11: style: Condition '!done' is always true [knownConditionTrueFalse] unrtf-0.21.10/src/convert.c:2562:15: note: Assignment 'done=0', assigned value is 0 unrtf-0.21.10/src/convert.c:2586:11: note: Condition '!done' is always true unrtf-0.21.10/src/convert.c:1498:19: style: Local variable 's' shadows outer variable [shadowVariable] unrtf-0.21.10/src/convert.c:1473:16: note: Shadowed declaration unrtf-0.21.10/src/convert.c:1498:19: note: Shadow variable unrtf-0.21.10/src/convert.c:1557:15: style: Local variable 'w4' shadows outer variable [shadowVariable] unrtf-0.21.10/src/convert.c:1500:13: note: Shadowed declaration unrtf-0.21.10/src/convert.c:1557:15: note: Shadow variable unrtf-0.21.10/src/convert.c:1558:21: style: Local variable 's4' shadows outer variable [shadowVariable] unrtf-0.21.10/src/convert.c:1499:19: note: Shadowed declaration unrtf-0.21.10/src/convert.c:1558:21: note: Shadow variable unrtf-0.21.10/src/convert.c:3055:17: style: Local variable 'param' shadows outer argument [shadowArgument] unrtf-0.21.10/src/convert.c:3047:69: note: Shadowed declaration unrtf-0.21.10/src/convert.c:3055:17: note: Shadow variable unrtf-0.21.10/src/convert.c:3073:30: style: Parameter 'w' can be declared as pointer to const [constParameter] unrtf-0.21.10/src/convert.c:682:6: style: Unused variable: l [unusedVariable] unrtf-0.21.10/src/convert.c:4303:7: style: Variable 's' is assigned a value that is never used. [unreadVariable] unrtf-0.21.10/src/convert.c:4315:7: style: Variable 's' is assigned a value that is never used. [unreadVariable] unrtf-0.21.10/src/convert.c:4320:7: style: Variable 's' is assigned a value that is never used. [unreadVariable] unrtf-0.21.10/src/hash.c:124:9: warning: Either the condition '!hi' is redundant or there is possible null pointer dereference: hi. [nullPointerRedundantCheck] unrtf-0.21.10/src/hash.c:120:6: note: Assuming that condition '!hi' is not redundant unrtf-0.21.10/src/hash.c:124:9: note: Null pointer dereference unrtf-0.21.10/src/hash.c:125:2: warning: Either the condition '!hi' is redundant or there is possible null pointer dereference: hi. [nullPointerRedundantCheck] unrtf-0.21.10/src/hash.c:120:6: note: Assuming that condition '!hi' is not redundant unrtf-0.21.10/src/hash.c:125:2: note: Null pointer dereference unrtf-0.21.10/src/main.c:352:3: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] unrtf-0.21.10/src/malloc.c:159:9: warning: Either the condition '!ptr' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] unrtf-0.21.10/src/malloc.c:154:6: note: Assuming that condition '!ptr' is not redundant unrtf-0.21.10/src/malloc.c:159:9: note: Null pointer dereference unrtf-0.21.10/src/my_iconv.c:69:3: error: Memory leak: obuf [memleak] unrtf-0.21.10/src/output.c:138:34: style: Condition 'ch<256' is always true [knownConditionTrueFalse] unrtf-0.21.10/src/output.c:132:19: note: Assuming that condition 'ch>255' is not redundant unrtf-0.21.10/src/output.c:138:34: note: Condition 'ch<256' is always true unrtf-0.21.10/src/output.c:176:57: style: Condition 'my_iconv(m_desc,&icp,&inbytes,&ocp,&outbytes)==-1' is always false [knownConditionTrueFalse] unrtf-0.21.10/src/output.c:174:12: style: Variable 'inbuf[0]' is assigned a value that is never used. [unreadVariable] unrtf-0.21.10/src/parse.c:454:12: style: Condition 'ch!=' '' is always true [knownConditionTrueFalse] unrtf-0.21.10/src/parse.c:250:9: warning: Either the condition '!new_ptr' is redundant or there is possible null pointer dereference: new_ptr. [nullPointerRedundantCheck] unrtf-0.21.10/src/parse.c:245:6: note: Assuming that condition '!new_ptr' is not redundant unrtf-0.21.10/src/parse.c:250:9: note: Null pointer dereference unrtf-0.21.10/src/parse.c:526:4: warning: Either the condition '!new_word' is redundant or there is possible null pointer dereference: new_word. [nullPointerRedundantCheck] unrtf-0.21.10/src/parse.c:520:8: note: Assuming that condition '!new_word' is not redundant unrtf-0.21.10/src/parse.c:526:4: note: Null pointer dereference unrtf-0.21.10/src/user.c:139:46: style: Redundant condition: c3=='\\'. 'c3!='\\' || (c3=='\\' && c4=='\\')' is equivalent to 'c3!='\\' || c4=='\\'' [redundantCondition] unrtf-0.21.10/src/user.c:64:3: error: Memory leak: f [memleak] unrtf-0.21.10/src/user.c:271:40: style:inconclusive: Function 'user_init' argument 2 names different: declaration 'tags_file_path' definition 'definitions_file_path'. [funcArgNamesDifferent] unrtf-0.21.10/src/user.h:163:64: note: Function 'user_init' argument 2 names different: declaration 'tags_file_path' definition 'definitions_file_path'. unrtf-0.21.10/src/user.c:271:40: note: Function 'user_init' argument 2 names different: declaration 'tags_file_path' definition 'definitions_file_path'. unrtf-0.21.10/src/word.c:284:11: style: Condition 's!=NULL' is always true [knownConditionTrueFalse] unrtf-0.21.10/src/word.c:248:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] diff: head unrtf-0.21.10/src/convert.c:3073:30: style: Parameter 'w' can be declared as pointer to const [constParameter] 2.8 unrtf-0.21.10/src/convert.c:3073:30: style: Parameter 'w' can be declared with const [constParameter] DONE