2022-07-01 21:07 ftp://ftp.de.debian.org/debian/pool/main/w/wcalc/wcalc_2.5.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: 596f75e (2022-07-01 10:48:32 +0200) count: 28 28 elapsed-time: 358.4 414.7 head-timing-info: Tokenizer::simplifyTokens1: 117.891s (avg. 5.61387s - 21 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 117.5s (avg. 5.59522s - 21 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.233658s (avg. 0.0111266s - 21 result(s)) Tokenizer::createTokens: 0.067289s (avg. 0.00320424s - 21 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.041753s (avg. 0.00198824s - 21 result(s)) Overall time: 235.931s old-timing-info: Tokenizer::simplifyTokens1: 136.471s (avg. 6.4986s - 21 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 136.026s (avg. 6.47743s - 21 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.26042s (avg. 0.012401s - 21 result(s)) Tokenizer::createTokens: 0.068339s (avg. 0.00325424s - 21 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.045732s (avg. 0.00217771s - 21 result(s)) Overall time: 273.064s head results: wcalc-2.5/src/cli/main.c:814:28: style: Redundant condition: errstring. '!errstring || (errstring && !strlen(errstring))' is equivalent to '!errstring || !strlen(errstring)' [redundantCondition] wcalc-2.5/src/cli/main.c:856:28: style: Redundant condition: errstring. '!errstring || (errstring && !strlen(errstring))' is equivalent to '!errstring || !strlen(errstring)' [redundantCondition] wcalc-2.5/src/cli/main.c:991:40: style: Redundant condition: errstring. '!errstring || (errstring && !strlen(errstring))' is equivalent to '!errstring || !strlen(errstring)' [redundantCondition] wcalc-2.5/src/cli/main.c:1618:96: warning: Either the condition 'curstr' is redundant or there is possible null pointer dereference: curstr. [nullPointerRedundantCheck] wcalc-2.5/src/cli/main.c:1620:17: note: Assuming that condition 'curstr' is not redundant wcalc-2.5/src/cli/main.c:1618:96: note: Null pointer dereference wcalc-2.5/src/cli/main.c:949:30: style: Local variable 'i' shadows outer variable [shadowVariable] wcalc-2.5/src/cli/main.c:535:16: note: Shadowed declaration wcalc-2.5/src/cli/main.c:949:30: note: Shadow variable wcalc-2.5/src/common/add_commas.c:29:37: warning:inconclusive: Either the condition 'NULL==input' is redundant or there is possible null pointer dereference: input. [nullPointerRedundantCheck] wcalc-2.5/src/common/add_commas.c:32:14: note: Assuming that condition 'NULL==input' is not redundant wcalc-2.5/src/common/add_commas.c:29:37: note: Null pointer dereference wcalc-2.5/src/common/calculator.c:361:10: style: Redundant initialization for 'curs'. The initialized value is overwritten before it is read. [redundantInitialization] wcalc-2.5/src/common/calculator.c:349:24: note: curs is initialized wcalc-2.5/src/common/calculator.c:361:10: note: curs is overwritten wcalc-2.5/src/common/calculator.c:48:12: warning:inconclusive: Found calculation inside sizeof(). [sizeofCalculation] wcalc-2.5/src/common/calculator.c:54:12: warning:inconclusive: Found calculation inside sizeof(). [sizeofCalculation] wcalc-2.5/src/common/calculator.c:60:12: warning:inconclusive: Found calculation inside sizeof(). [sizeofCalculation] wcalc-2.5/src/common/extract_vars.c:42:19: warning: Either the condition 'curs' is redundant or there is possible null pointer dereference: curs. [nullPointerRedundantCheck] wcalc-2.5/src/common/extract_vars.c:34:24: note: Assuming that condition 'curs' is not redundant wcalc-2.5/src/common/extract_vars.c:42:19: note: Null pointer dereference wcalc-2.5/src/common/extract_vars.c:48:15: warning: Either the condition 'curs' is redundant or there is possible null pointer dereference: curs. [nullPointerRedundantCheck] wcalc-2.5/src/common/extract_vars.c:25:16: note: Assuming that condition 'curs' is not redundant wcalc-2.5/src/common/extract_vars.c:48:15: note: Null pointer dereference wcalc-2.5/src/common/files.c:242:29: style: Redundant condition: errstring. '!errstring || (errstring && !strlen(errstring))' is equivalent to '!errstring || !strlen(errstring)' [redundantCondition] wcalc-2.5/src/common/list.c:415:27: style: Parameter 'item' can be declared as pointer to const [constParameter] wcalc-2.5/src/common/number.c:49:14: error: Uninitialized variable: temp [uninitvar] ../../../svn/src/common/parser.y:204:17: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] ../../../svn/src/common/parser.c:1231:55: style: Parameter 'yytop' can be declared as pointer to const [constParameter] ../../../svn/src/common/scanner.c:3728:27: warning: Possible null pointer dereference: b [nullPointer] ../../../svn/src/common/scanner.c:3725:24: note: Assignment 'b=(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL', assigned value is 0 ../../../svn/src/common/scanner.c:3728:27: note: Null pointer dereference ../../../svn/src/common/scanner.c:3730:9: warning: Possible null pointer dereference: b [nullPointer] ../../../svn/src/common/scanner.c:3725:24: note: Assignment 'b=(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL', assigned value is 0 ../../../svn/src/common/scanner.c:3730:9: note: Null pointer dereference ../../../svn/src/common/scanner.c:4060:2: warning: Possible null pointer dereference: b [nullPointer] ../../../svn/src/common/scanner.c:3949:17: note: Calling function 'yy_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 ../../../svn/src/common/scanner.c:4060:2: note: Null pointer dereference ../../../svn/src/common/scanner.c:4061:2: warning: Possible null pointer dereference: b [nullPointer] ../../../svn/src/common/scanner.c:3949:17: note: Calling function 'yy_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 ../../../svn/src/common/scanner.c:4061:2: note: Null pointer dereference ../../../svn/src/common/scanner.c:3762:3: style: Redundant initialization for 'c'. The initialized value is overwritten before it is read. [redundantInitialization] ../../../svn/src/common/scanner.c:3762:3: note: c is initialized ../../../svn/src/common/scanner.c:3762:3: note: c is overwritten ../../../svn/src/common/scanner.c:3838:59: style:inconclusive: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. [funcArgNamesDifferent] ../../../svn/src/common/scanner.c:360:54: note: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. ../../../svn/src/common/scanner.c:3838:59: note: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. ../../../svn/src/common/scanner.c:4245:48: style:inconclusive: Function 'yy_scan_string' argument 1 names different: declaration 'yy_str' definition 'yystr'. [funcArgNamesDifferent] ../../../svn/src/common/scanner.c:310:47: note: Function 'yy_scan_string' argument 1 names different: declaration 'yy_str' definition 'yystr'. ../../../svn/src/common/scanner.c:4245:48: note: Function 'yy_scan_string' argument 1 names different: declaration 'yy_str' definition 'yystr'. ../../../svn/src/common/scanner.c:4258:48: style:inconclusive: Function 'yy_scan_bytes' argument 1 names different: declaration 'bytes' definition 'yybytes'. [funcArgNamesDifferent] ../../../svn/src/common/scanner.c:311:46: note: Function 'yy_scan_bytes' argument 1 names different: declaration 'bytes' definition 'yybytes'. ../../../svn/src/common/scanner.c:4258:48: note: Function 'yy_scan_bytes' argument 1 names different: declaration 'bytes' definition 'yybytes'. ../../../svn/src/common/scanner.c:4258:62: style:inconclusive: Function 'yy_scan_bytes' argument 2 names different: declaration 'len' definition '_yybytes_len'. [funcArgNamesDifferent] ../../../svn/src/common/scanner.c:311:56: note: Function 'yy_scan_bytes' argument 2 names different: declaration 'len' definition '_yybytes_len'. ../../../svn/src/common/scanner.c:4258:62: note: Function 'yy_scan_bytes' argument 2 names different: declaration 'len' definition '_yybytes_len'. ../../../svn/src/common/scanner.c:4390:24: style:inconclusive: Function 'yyset_debug' argument 1 names different: declaration 'debug_flag' definition 'bdebug'. [funcArgNamesDifferent] ../../../svn/src/common/scanner.c:1788:23: note: Function 'yyset_debug' argument 1 names different: declaration 'debug_flag' definition 'bdebug'. ../../../svn/src/common/scanner.c:4390:24: note: Function 'yyset_debug' argument 1 names different: declaration 'debug_flag' definition 'bdebug'. ../../../svn/src/common/scanner.c:4258:48: style: Parameter 'yybytes' can be declared as pointer to const [constParameter] diff: head ../../../svn/src/common/parser.c:1231:55: style: Parameter 'yytop' can be declared as pointer to const [constParameter] 2.8 ../../../svn/src/common/parser.c:1231:55: style: Parameter 'yytop' can be declared with const [constParameter] head ../../../svn/src/common/scanner.c:4258:48: style: Parameter 'yybytes' can be declared as pointer to const [constParameter] 2.8 ../../../svn/src/common/scanner.c:4258:48: style: Parameter 'yybytes' can be declared with const [constParameter] head wcalc-2.5/src/common/list.c:415:27: style: Parameter 'item' can be declared as pointer to const [constParameter] 2.8 wcalc-2.5/src/common/list.c:415:27: style: Parameter 'item' can be declared with const [constParameter] DONE