2022-06-29 11:15 ftp://ftp.de.debian.org/debian/pool/main/libg/libgdchart-gd2/libgdchart-gd2_0.11.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: b90a726 (2022-06-29 07:22:26 +0200) count: 42 42 elapsed-time: 1796.0 1740.3 head-timing-info: Tokenizer::simplifyTokens1: 589.246s (avg. 73.6557s - 8 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 588.347s (avg. 73.5434s - 8 result(s)) Condition::runChecks: 2.07569s (avg. 0.259462s - 8 result(s)) Other::runChecks: 0.880295s (avg. 0.110037s - 8 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.805635s (avg. 0.100704s - 8 result(s)) Overall time: 1181.53s old-timing-info: Tokenizer::simplifyTokens1: 569.581s (avg. 71.1976s - 8 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 568.658s (avg. 71.0823s - 8 result(s)) Condition::runChecks: 2.96563s (avg. 0.370704s - 8 result(s)) Other::runChecks: 1.28238s (avg. 0.160298s - 8 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.834827s (avg. 0.104353s - 8 result(s)) Overall time: 1143.48s head results: gdchart0.11.5dev/gdc.c:152:11: style: Redundant initialization for 'strs_num'. The initialized value is overwritten before it is read. [redundantInitialization] gdchart0.11.5dev/gdc.c:148:19: note: strs_num is initialized gdchart0.11.5dev/gdc.c:152:11: note: strs_num is overwritten gdchart0.11.5dev/gdc.c:265:12: style:inconclusive: Function 'out_err' argument 6 names different: declaration 'str' definition 'err_str'. [funcArgNamesDifferent] gdchart0.11.5dev/gdc.h:156:14: note: Function 'out_err' argument 6 names different: declaration 'str' definition 'err_str'. gdchart0.11.5dev/gdc.c:265:12: note: Function 'out_err' argument 6 names different: declaration 'str' definition 'err_str'. gdchart0.11.5dev/gdc.c:158:16: style: Variable 'sub_str[len]' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdc_pie.c:265:16: style: Variable 'lbl_wdth' is reassigned a value before the old one has been used. [redundantAssignment] gdchart0.11.5dev/gdc_pie.c:252:15: note: lbl_wdth is assigned gdchart0.11.5dev/gdc_pie.c:265:16: note: lbl_wdth is overwritten gdchart0.11.5dev/gdc_pie.c:266:16: style: Variable 'lbl_hgt' is reassigned a value before the old one has been used. [redundantAssignment] gdchart0.11.5dev/gdc_pie.c:253:15: note: lbl_hgt is assigned gdchart0.11.5dev/gdc_pie.c:266:16: note: lbl_hgt is overwritten gdchart0.11.5dev/gdc_pie.c:115:22: style:inconclusive: Function 'GDC_out_pie' argument 1 names different: declaration 'width' definition 'IMGWIDTH'. [funcArgNamesDifferent] gdchart0.11.5dev/gdcpie.h:77:27: note: Function 'GDC_out_pie' argument 1 names different: declaration 'width' definition 'IMGWIDTH'. gdchart0.11.5dev/gdc_pie.c:115:22: note: Function 'GDC_out_pie' argument 1 names different: declaration 'width' definition 'IMGWIDTH'. gdchart0.11.5dev/gdc_pie.c:116:13: style:inconclusive: Function 'GDC_out_pie' argument 2 names different: declaration 'height' definition 'IMGHEIGHT'. [funcArgNamesDifferent] gdchart0.11.5dev/gdcpie.h:78:15: note: Function 'GDC_out_pie' argument 2 names different: declaration 'height' definition 'IMGHEIGHT'. gdchart0.11.5dev/gdc_pie.c:116:13: note: Function 'GDC_out_pie' argument 2 names different: declaration 'height' definition 'IMGHEIGHT'. gdchart0.11.5dev/gdc_pie.c:120:13: style:inconclusive: Function 'GDC_out_pie' argument 6 names different: declaration 'labels' definition 'lbl'. [funcArgNamesDifferent] gdchart0.11.5dev/gdcpie.h:82:15: note: Function 'GDC_out_pie' argument 6 names different: declaration 'labels' definition 'lbl'. gdchart0.11.5dev/gdc_pie.c:120:13: note: Function 'GDC_out_pie' argument 6 names different: declaration 'labels' definition 'lbl'. gdchart0.11.5dev/gdc_pie.c:121:13: style:inconclusive: Function 'GDC_out_pie' argument 7 names different: declaration 'data' definition 'val'. [funcArgNamesDifferent] gdchart0.11.5dev/gdcpie.h:83:15: note: Function 'GDC_out_pie' argument 7 names different: declaration 'data' definition 'val'. gdchart0.11.5dev/gdc_pie.c:121:13: note: Function 'GDC_out_pie' argument 7 names different: declaration 'data' definition 'val'. gdchart0.11.5dev/gdc_pie.c:433:12: style: Local variable 'rad' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdc_pie.c:134:9: note: Shadowed declaration gdchart0.11.5dev/gdc_pie.c:433:12: note: Shadow variable gdchart0.11.5dev/gdc_pie.c:555:10: style: Local variable 'rad' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdc_pie.c:134:9: note: Shadowed declaration gdchart0.11.5dev/gdc_pie.c:555:10: note: Shadow variable gdchart0.11.5dev/gdc_pie.c:660:12: style: Local variable 'rad' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdc_pie.c:134:9: note: Shadowed declaration gdchart0.11.5dev/gdc_pie.c:660:12: note: Shadow variable gdchart0.11.5dev/gdc_pie.c:121:13: style: Parameter 'val' can be declared as const array [constParameter] gdchart0.11.5dev/gdc_pie.c:479:10: warning: Uninitialized variables: tmp_slice.i, tmp_slice.hidden, tmp_slice.angle, tmp_slice.slice [uninitvar] gdchart0.11.5dev/gdc_pie.c:445:14: note: Assuming condition is false gdchart0.11.5dev/gdc_pie.c:479:10: note: Uninitialized variables: tmp_slice.i, tmp_slice.hidden, tmp_slice.angle, tmp_slice.slice gdchart0.11.5dev/gdc_pie.c:202:28: style: Variable 'label_explode_limit' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdc_pie.c:146:9: style: Variable 'num_slices1' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdc_pie.c:147:5: style: Variable 'num_slices2' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdc_pie.c:148:8: style: Variable 'any_too_small' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdc_pie.c:156:8: style: Variable 'do3Dx' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdc_pie.c:157:5: style: Variable 'do3Dy' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdchart.c:823:9: debug: Wrong data detected by condition !tok->next()->astOperand1() [DacaWrongData] gdchart0.11.5dev/gdchart.c:1096:11: debug: Wrong data detected by condition !tok->next()->astOperand1() [DacaWrongData] gdchart0.11.5dev/gdchart.c:710:24: style: Redundant condition: GDC_xlabel_ctl. '!GDC_xlabel_ctl || (GDC_xlabel_ctl && GDC_xlabel_ctl[i])' is equivalent to '!GDC_xlabel_ctl || GDC_xlabel_ctl[i]' [redundantCondition] gdchart0.11.5dev/gdchart.c:437:2: style: Same expression in both branches of ternary operator. [duplicateExpressionTernary] gdchart0.11.5dev/gdchart.c:696:8: style:inconclusive: Same expression used in consecutive assignments of 'biggest' and 'widest'. [duplicateAssignExpression] gdchart0.11.5dev/gdchart.c:697:5: note: Same expression used in consecutive assignments of 'biggest' and 'widest'. gdchart0.11.5dev/gdchart.c:696:8: note: Same expression used in consecutive assignments of 'biggest' and 'widest'. gdchart0.11.5dev/gdchart.c:301:19: style:inconclusive: Function 'out_graph' argument 1 names different: declaration 'imgwidth' definition 'IMGWIDTH'. [funcArgNamesDifferent] gdchart0.11.5dev/gdchart.h:210:23: note: Function 'out_graph' argument 1 names different: declaration 'imgwidth' definition 'IMGWIDTH'. gdchart0.11.5dev/gdchart.c:301:19: note: Function 'out_graph' argument 1 names different: declaration 'imgwidth' definition 'IMGWIDTH'. gdchart0.11.5dev/gdchart.c:302:13: style:inconclusive: Function 'out_graph' argument 2 names different: declaration 'imgheight' definition 'IMGHEIGHT'. [funcArgNamesDifferent] gdchart0.11.5dev/gdchart.h:211:14: note: Function 'out_graph' argument 2 names different: declaration 'imgheight' definition 'IMGHEIGHT'. gdchart0.11.5dev/gdchart.c:302:13: note: Function 'out_graph' argument 2 names different: declaration 'imgheight' definition 'IMGHEIGHT'. gdchart0.11.5dev/gdchart.c:1376:11: style: Local variable 'k' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdchart.c:377:14: note: Shadowed declaration gdchart0.11.5dev/gdchart.c:1376:11: note: Shadow variable gdchart0.11.5dev/gdchart.c:1391:11: style: Local variable 'k' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdchart.c:377:14: note: Shadowed declaration gdchart0.11.5dev/gdchart.c:1391:11: note: Shadow variable gdchart0.11.5dev/gdchart.c:1495:11: style: Local variable 'j' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdchart.c:377:11: note: Shadowed declaration gdchart0.11.5dev/gdchart.c:1495:11: note: Shadow variable gdchart0.11.5dev/gdchart.c:1513:12: style: Local variable 'k' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdchart.c:377:14: note: Shadowed declaration gdchart0.11.5dev/gdchart.c:1513:12: note: Shadow variable gdchart0.11.5dev/gdchart.c:1711:10: style: Local variable 'j' shadows outer variable [shadowVariable] gdchart0.11.5dev/gdchart.c:377:11: note: Shadowed declaration gdchart0.11.5dev/gdchart.c:1711:10: note: Shadow variable gdchart0.11.5dev/gdchart.c:55:12: style: Parameter 'y2' can be declared as const array [constParameter] gdchart0.11.5dev/gdchart.c:59:12: style: Parameter 'clr' can be declared as const array [constParameter] gdchart0.11.5dev/gdchart.c:60:12: style: Parameter 'clrshd' can be declared as const array [constParameter] gdchart0.11.5dev/gdchart.c:65:2: style: Unused variable: lnclr [unusedVariable] gdchart0.11.5dev/gdchart.c:66:2: style: Unused variable: shclr [unusedVariable] gdchart0.11.5dev/gdchart.c:1495:13: style: Variable 'j' is assigned a value that is never used. [unreadVariable] gdchart0.11.5dev/gdchart.c:377:14: style: Unused variable: k [unusedVariable] gdchart0.11.5dev/gdchart.c:463:5: style: Unused variable: ThumbDColor [unusedVariable] gdchart0.11.5dev/gdchart.c:464:5: style: Unused variable: ThumbLblColor [unusedVariable] gdchart0.11.5dev/gdchart.c:465:5: style: Unused variable: ThumbUColor [unusedVariable] diff: head gdchart0.11.5dev/gdc_pie.c:121:13: style: Parameter 'val' can be declared as const array [constParameter] 2.8 gdchart0.11.5dev/gdc_pie.c:121:13: style: Parameter 'val' can be declared with const [constParameter] 2.8 gdchart0.11.5dev/gdc_pie.c:479:10: error: Uninitialized variables: tmp_slice.i, tmp_slice.hidden, tmp_slice.angle, tmp_slice.slice [uninitvar] gdchart0.11.5dev/gdc_pie.c:445:14: note: Assuming condition is false gdchart0.11.5dev/gdc_pie.c:479:10: note: Uninitialized variables: tmp_slice.i, tmp_slice.hidden, tmp_slice.angle, tmp_slice.slice head gdchart0.11.5dev/gdc_pie.c:479:10: warning: Uninitialized variables: tmp_slice.i, tmp_slice.hidden, tmp_slice.angle, tmp_slice.slice [uninitvar] gdchart0.11.5dev/gdc_pie.c:445:14: note: Assuming condition is false gdchart0.11.5dev/gdc_pie.c:479:10: note: Uninitialized variables: tmp_slice.i, tmp_slice.hidden, tmp_slice.angle, tmp_slice.slice head gdchart0.11.5dev/gdchart.c:55:12: style: Parameter 'y2' can be declared as const array [constParameter] 2.8 gdchart0.11.5dev/gdchart.c:55:12: style: Parameter 'y2' can be declared with const [constParameter] head gdchart0.11.5dev/gdchart.c:59:12: style: Parameter 'clr' can be declared as const array [constParameter] 2.8 gdchart0.11.5dev/gdchart.c:59:12: style: Parameter 'clr' can be declared with const [constParameter] head gdchart0.11.5dev/gdchart.c:60:12: style: Parameter 'clrshd' can be declared as const array [constParameter] 2.8 gdchart0.11.5dev/gdchart.c:60:12: style: Parameter 'clrshd' can be declared with const [constParameter] DONE