2022-06-29 02:28 ftp://ftp.de.debian.org/debian/pool/main/l/lgogdownloader/lgogdownloader_3.9.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 -j2 platform: Linux-5.4.0-110-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 1852944 (2022-06-28 22:52:35 +0200) count: 92 75 elapsed-time: 7.3 13.8 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: lgogdownloader-3.9/src/downloader.cpp:2777:17: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] lgogdownloader-3.9/src/downloader.cpp:3883:21: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] lgogdownloader-3.9/src/downloader.cpp:4716:17: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] lgogdownloader-3.9/src/downloader.cpp:4921:25: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] lgogdownloader-3.9/src/downloader.cpp:988:54: style: Condition '!bSameVersion' is always false [knownConditionTrueFalse] lgogdownloader-3.9/src/downloader.cpp:958:13: note: Assuming that condition 'bSameVersion' is not redundant lgogdownloader-3.9/src/downloader.cpp:988:54: note: Condition '!bSameVersion' is always false lgogdownloader-3.9/src/downloader.cpp:1406:32: style: C-style pointer casting [cstyleCast] lgogdownloader-3.9/src/downloader.cpp:3752:44: style: C-style pointer casting [cstyleCast] lgogdownloader-3.9/src/downloader.cpp:3860:28: style: C-style pointer casting [cstyleCast] lgogdownloader-3.9/src/downloader.cpp:898:11: style: The scope of the variable 'offset' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:963:23: style: The scope of the variable 'filesize_xml' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:1193:21: style: The scope of the variable 'from_offset' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:1193:34: style: The scope of the variable 'to_offset' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:1194:17: style: The scope of the variable 'filehash' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:1547:9: style: The scope of the variable 'bar_length' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:1548:9: style: The scope of the variable 'min_bar_length' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:2045:9: style: The scope of the variable 'res' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:2689:27: style: The scope of the variable 'filesize_xml' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:3484:17: style: The scope of the variable 'old_build_id' can be reduced. [variableScope] lgogdownloader-3.9/src/downloader.cpp:991:57: style: Local variable 'path' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/downloader.cpp:937:29: note: Shadowed declaration lgogdownloader-3.9/src/downloader.cpp:991:57: note: Shadow variable lgogdownloader-3.9/src/downloader.cpp:1092:37: style: Local variable 'path' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/downloader.cpp:937:29: note: Shadowed declaration lgogdownloader-3.9/src/downloader.cpp:1092:37: note: Shadow variable lgogdownloader-3.9/src/downloader.cpp:1132:33: style: Local variable 'path' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/downloader.cpp:937:29: note: Shadowed declaration lgogdownloader-3.9/src/downloader.cpp:1132:33: note: Shadow variable lgogdownloader-3.9/src/downloader.cpp:3518:21: style: Local variable 'link' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/downloader.cpp:3460:17: note: Shadowed declaration lgogdownloader-3.9/src/downloader.cpp:3518:21: note: Shadow variable lgogdownloader-3.9/src/downloader.cpp:3941:30: style: Local variable 'response_code' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/downloader.cpp:3877:22: note: Shadowed declaration lgogdownloader-3.9/src/downloader.cpp:3941:30: note: Shadow variable lgogdownloader-3.9/src/downloader.cpp:845:43: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/downloader.cpp:976:51: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/downloader.cpp:2563:39: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/downloader.cpp:2702:55: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/downloader.cpp:5064:39: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/downloader.cpp:2416:13: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm] lgogdownloader-3.9/src/downloader.cpp:3535:17: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] lgogdownloader-3.9/src/downloader.cpp:1406:24: warning: Size of pointer 'chunk' used instead of size of its data. [pointerSize] lgogdownloader-3.9/src/downloader.cpp:3752:36: warning: Size of pointer 'chunk' used instead of size of its data. [pointerSize] lgogdownloader-3.9/src/downloader.cpp:1510:24: style: Unused variable: memory [unusedVariable] lgogdownloader-3.9/src/downloader.cpp:3877:36: style: Variable 'response_code' is assigned a value that is never used. [unreadVariable] lgogdownloader-3.9/src/downloader.cpp:4152:102: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/src/galaxyapi.cpp:149:46: style: Local variable 'exc' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/galaxyapi.cpp:121:38: note: Shadowed declaration lgogdownloader-3.9/src/galaxyapi.cpp:149:46: note: Shadow variable lgogdownloader-3.9/src/gamedetails.cpp:219:10: warning: Return value of function std::remove_if() is not used. [ignoredReturnValue] lgogdownloader-3.9/src/gamedetails.cpp:219:5: warning: Return value of std::remove_if() ignored. Elements remain in container. [uselessCallsRemove] lgogdownloader-3.9/src/gamedetails.cpp:46:97: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/src/gamedetails.cpp:76:17: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/src/gui_login.cpp:70:13: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] lgogdownloader-3.9/main.cpp:116:17: style: The scope of the variable 'galaxy_install_subdir_text' can be reduced. [variableScope] lgogdownloader-3.9/main.cpp:142:17: style: The scope of the variable 'subdir_help_text' can be reduced. [variableScope] lgogdownloader-3.9/main.cpp:346:37: style: Local variable 'parsed' shadows outer variable [shadowVariable] lgogdownloader-3.9/main.cpp:287:29: note: Shadowed declaration lgogdownloader-3.9/main.cpp:346:37: note: Shadow variable lgogdownloader-3.9/main.cpp:367:39: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:368:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:367:39: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:368:47: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:368:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:368:47: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:388:39: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:389:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:388:39: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:389:47: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:389:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:389:47: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:414:43: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:415:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:414:43: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:415:51: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:415:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:415:51: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:439:43: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:440:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:439:43: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:440:51: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:440:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:440:51: note: Access of moved variable 'line'. lgogdownloader-3.9/main.cpp:525:94: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/main.cpp:529:94: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/main.cpp:752:106: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/src/util.cpp:810:13: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] lgogdownloader-3.9/src/util.cpp:109:32: style: C-style pointer casting [cstyleCast] lgogdownloader-3.9/src/util.cpp:221:32: style: C-style pointer casting [cstyleCast] lgogdownloader-3.9/src/util.cpp:853:30: style: C-style pointer casting [cstyleCast] lgogdownloader-3.9/src/util.cpp:855:19: style: C-style pointer casting [cstyleCast] lgogdownloader-3.9/src/util.cpp:157:25: style: The scope of the variable 'size' can be reduced. [variableScope] lgogdownloader-3.9/src/util.cpp:109:24: warning: Size of pointer 'chunk' used instead of size of its data. [pointerSize] lgogdownloader-3.9/src/util.cpp:221:24: warning: Size of pointer 'chunk' used instead of size of its data. [pointerSize] lgogdownloader-3.9/src/util.cpp:608:122: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/src/util.cpp:612:114: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] lgogdownloader-3.9/src/website.cpp:310:9: style: Condition 'bRecaptcha' is always false [knownConditionTrueFalse] lgogdownloader-3.9/src/website.cpp:277:23: note: Assignment 'bRecaptcha=false', assigned value is 0 lgogdownloader-3.9/src/website.cpp:284:71: note: Assuming condition is false lgogdownloader-3.9/src/website.cpp:310:9: note: Condition 'bRecaptcha' is always false lgogdownloader-3.9/src/website.cpp:427:26: style: Variable 'redirect_url' is reassigned a value before the old one has been used. [redundantAssignment] lgogdownloader-3.9/src/website.cpp:381:26: note: redirect_url is assigned lgogdownloader-3.9/src/website.cpp:427:26: note: redirect_url is overwritten lgogdownloader-3.9/src/website.cpp:439:24: style: Variable 'result' is reassigned a value before the old one has been used. [redundantAssignment] lgogdownloader-3.9/src/website.cpp:436:24: note: result is assigned lgogdownloader-3.9/src/website.cpp:439:24: note: result is overwritten lgogdownloader-3.9/src/website.cpp:526:8: style: Redundant initialization for 'it'. The initialized value is overwritten before it is read. [redundantInitialization] lgogdownloader-3.9/src/website.cpp:523:44: note: it is initialized lgogdownloader-3.9/src/website.cpp:526:8: note: it is overwritten lgogdownloader-3.9/src/website.cpp:527:9: style: Redundant initialization for 'end'. The initialized value is overwritten before it is read. [redundantInitialization] lgogdownloader-3.9/src/website.cpp:524:45: note: end is initialized lgogdownloader-3.9/src/website.cpp:527:9: note: end is overwritten lgogdownloader-3.9/src/website.cpp:268:17: style: The scope of the variable 'postdata' can be reduced. [variableScope] lgogdownloader-3.9/src/website.cpp:270:17: style: The scope of the variable 'token' can be reduced. [variableScope] lgogdownloader-3.9/src/website.cpp:271:17: style: The scope of the variable 'tagname_username' can be reduced. [variableScope] lgogdownloader-3.9/src/website.cpp:272:17: style: The scope of the variable 'tagname_password' can be reduced. [variableScope] lgogdownloader-3.9/src/website.cpp:273:17: style: The scope of the variable 'tagname_login' can be reduced. [variableScope] lgogdownloader-3.9/src/website.cpp:274:17: style: The scope of the variable 'tagname_token' can be reduced. [variableScope] lgogdownloader-3.9/src/website.cpp:146:31: style: Local variable 'i' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/website.cpp:91:9: note: Shadowed declaration lgogdownloader-3.9/src/website.cpp:146:31: note: Shadow variable lgogdownloader-3.9/src/website.cpp:614:31: style: Local variable 'i' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/website.cpp:588:9: note: Shadowed declaration lgogdownloader-3.9/src/website.cpp:614:31: note: Shadow variable lgogdownloader-3.9/src/website.cpp:172:55: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/website.cpp:661:63: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/website.cpp:286:20: style: Variable 'bRecaptcha' is assigned a value that is never used. [unreadVariable] lgogdownloader-3.9/src/website.cpp:620:29: style: Unused variable: platforms_text [unusedVariable] lgogdownloader-3.9/src/ziputil.cpp:393:22: style: The scope of the variable 'modification_time' can be reduced. [variableScope] lgogdownloader-3.9/src/ziputil.cpp:443:30: style: Local variable 'i' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/ziputil.cpp:335:11: note: Shadowed declaration lgogdownloader-3.9/src/ziputil.cpp:443:30: note: Shadow variable lgogdownloader-3.9/src/ziputil.cpp:449:30: style: Local variable 'i' shadows outer variable [shadowVariable] lgogdownloader-3.9/src/ziputil.cpp:335:11: note: Shadowed declaration lgogdownloader-3.9/src/ziputil.cpp:449:30: note: Shadow variable lgogdownloader-3.9/src/ziputil.cpp:527:42: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/ziputil.cpp:595:42: style: Variable 'e' can be declared as reference to const [constVariable] lgogdownloader-3.9/src/ziputil.cpp:393:40: style: Variable 'modification_time' is assigned a value that is never used. [unreadVariable] lgogdownloader-3.9/src/ziputil.cpp:439:30: style: Variable 'uid' is assigned a value that is never used. [unreadVariable] lgogdownloader-3.9/src/ziputil.cpp:440:30: style: Variable 'gid' is assigned a value that is never used. [unreadVariable] lgogdownloader-3.9/src/ziputil.cpp:445:25: style: Variable 'uid' is assigned a value that is never used. [unreadVariable] lgogdownloader-3.9/src/ziputil.cpp:451:25: style: Variable 'gid' is assigned a value that is never used. [unreadVariable] diff: head lgogdownloader-3.9/main.cpp:367:39: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:368:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:367:39: note: Access of moved variable 'line'. head lgogdownloader-3.9/main.cpp:368:47: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:368:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:368:47: note: Access of moved variable 'line'. head lgogdownloader-3.9/main.cpp:388:39: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:389:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:388:39: note: Access of moved variable 'line'. head lgogdownloader-3.9/main.cpp:389:47: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:389:37: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:389:47: note: Access of moved variable 'line'. head lgogdownloader-3.9/main.cpp:414:43: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:415:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:414:43: note: Access of moved variable 'line'. head lgogdownloader-3.9/main.cpp:415:51: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:415:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:415:51: note: Access of moved variable 'line'. head lgogdownloader-3.9/main.cpp:439:43: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:440:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:439:43: note: Access of moved variable 'line'. head lgogdownloader-3.9/main.cpp:440:51: warning:inconclusive: Access of moved variable 'line'. [accessMoved] lgogdownloader-3.9/main.cpp:440:41: note: Calling std::move(line) lgogdownloader-3.9/main.cpp:440:51: note: Access of moved variable 'line'. head lgogdownloader-3.9/src/downloader.cpp:2563:39: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/downloader.cpp:2702:55: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/downloader.cpp:5064:39: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/downloader.cpp:845:43: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/downloader.cpp:976:51: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/website.cpp:172:55: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/website.cpp:661:63: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/ziputil.cpp:527:42: style: Variable 'e' can be declared as reference to const [constVariable] head lgogdownloader-3.9/src/ziputil.cpp:595:42: style: Variable 'e' can be declared as reference to const [constVariable] DONE