2022-07-02 07:06 ftp://ftp.de.debian.org/debian/pool/main/a/abe/abe_1.1+dfsg.orig.tar.gz 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: 596f75e (2022-07-01 10:48:32 +0200) count: 38 38 elapsed-time: 65.8 77.0 head-timing-info: Tokenizer::simplifyTokens1: 65.6079s (avg. 4.37386s - 15 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 65.3384s (avg. 4.35589s - 15 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.137187s (avg. 0.0091458s - 15 result(s)) Tokenizer::createTokens: 0.04404s (avg. 0.002936s - 15 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.0326s (avg. 0.00217333s - 15 result(s)) Overall time: 131.298s old-timing-info: Tokenizer::simplifyTokens1: 76.8328s (avg. 5.12219s - 15 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 76.5762s (avg. 5.10508s - 15 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.130961s (avg. 0.00873073s - 15 result(s)) Tokenizer::createTokens: 0.040705s (avg. 0.00271367s - 15 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.03223s (avg. 0.00214867s - 15 result(s)) Overall time: 153.736s head results: abe-1.1.orig/src/Directories.c:13:11: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] abe-1.1.orig/src/Editor.c:116:15: style: Variable 'pos.pos_x' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Editor.c:117:15: style: Variable 'pos.pos_y' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Font.c:56:9: style: Redundant initialization for 'p'. The initialized value is overwritten before it is read. [redundantInitialization] abe-1.1.orig/src/Font.c:55:11: note: p is initialized abe-1.1.orig/src/Font.c:56:9: note: p is overwritten abe-1.1.orig/src/Game.c:554:27: style: Variable 'game.lastSavePosX' is reassigned a value before the old one has been used. [redundantAssignment] abe-1.1.orig/src/Game.c:553:27: note: game.lastSavePosX is assigned abe-1.1.orig/src/Game.c:554:27: note: game.lastSavePosX is overwritten abe-1.1.orig/src/Main.c:204:13: style: Variable 'mapname' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Main.c:205:14: style: Variable 'mapwidth' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Main.c:206:15: style: Variable 'mapheight' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Main.c:208:13: style: Variable 'mapname' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Main.c:209:14: style: Variable 'mapwidth' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Main.c:210:15: style: Variable 'mapheight' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Main.c:208:15: style: Variable 'mapname' is allocated memory that is never used. [unusedAllocatedMemory] abe-1.1.orig/src/Map.c:1264:38: style:inconclusive: Boolean expression '!hw_surface' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] abe-1.1.orig/src/Map.c:1297:36: style:inconclusive: Boolean expression '!hw_surface' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] abe-1.1.orig/src/Map.c:1319:36: style:inconclusive: Boolean expression '!hw_surface' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] abe-1.1.orig/src/Map.c:1264:38: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] abe-1.1.orig/src/Map.c:1297:36: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] abe-1.1.orig/src/Map.c:1319:36: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] abe-1.1.orig/src/Map.c:442:13: style: Variable 'pos.w' is reassigned a value before the old one has been used. [redundantAssignment] abe-1.1.orig/src/Map.c:437:13: note: pos.w is assigned abe-1.1.orig/src/Map.c:442:13: note: pos.w is overwritten abe-1.1.orig/src/Map.c:443:13: style: Variable 'pos.h' is reassigned a value before the old one has been used. [redundantAssignment] abe-1.1.orig/src/Map.c:438:13: note: pos.h is assigned abe-1.1.orig/src/Map.c:443:13: note: pos.h is overwritten abe-1.1.orig/src/Map.c:1262:55: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] abe-1.1.orig/src/Map.c:1317:55: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] abe-1.1.orig/src/MapIO.c:96:3: portability: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] abe-1.1.orig/src/MapIO.c:163:5: error: Resource leak: fp [resourceLeak] abe-1.1.orig/src/MapIO.c:178:5: error: Memory leak: buff [memleak] abe-1.1.orig/src/MapIO.c:58:13: style:inconclusive: Function 'loadMap' argument 1 names different: declaration 'drawMap' definition 'draw_map'. [funcArgNamesDifferent] abe-1.1.orig/src/MapIO.h:11:17: note: Function 'loadMap' argument 1 names different: declaration 'drawMap' definition 'draw_map'. abe-1.1.orig/src/MapIO.c:58:13: note: Function 'loadMap' argument 1 names different: declaration 'drawMap' definition 'draw_map'. abe-1.1.orig/src/MapIO.c:66:29: style:inconclusive: Function 'loadMapPath' argument 2 names different: declaration 'drawMap' definition 'draw_map'. [funcArgNamesDifferent] abe-1.1.orig/src/MapIO.h:13:33: note: Function 'loadMapPath' argument 2 names different: declaration 'drawMap' definition 'draw_map'. abe-1.1.orig/src/MapIO.c:66:29: note: Function 'loadMapPath' argument 2 names different: declaration 'drawMap' definition 'draw_map'. abe-1.1.orig/src/MapIO.c:237:24: style:inconclusive: Function 'decompressMap' argument 1 names different: declaration 'data' definition 'p'. [funcArgNamesDifferent] abe-1.1.orig/src/MapIO.h:24:29: note: Function 'decompressMap' argument 1 names different: declaration 'data' definition 'p'. abe-1.1.orig/src/MapIO.c:237:24: note: Function 'decompressMap' argument 1 names different: declaration 'data' definition 'p'. abe-1.1.orig/src/Menu.c:72:23: error: Array 'entries[11]' accessed at index 49, which is out of bounds. [arrayIndexOutOfBounds] abe-1.1.orig/src/Menu.c:71:16: note: Assuming that condition 'i<50' is not redundant abe-1.1.orig/src/Menu.c:72:23: note: Array index out of bounds abe-1.1.orig/src/Monster.c:669:5: warning: Either the condition '(live->custom=(int*)malloc(sizeof(int)))==NULL' is redundant or there is possible null pointer dereference: (int*)(live->custom). [nullPointerRedundantCheck] abe-1.1.orig/src/Monster.c:665:51: note: Assuming that condition '(live->custom=(int*)malloc(sizeof(int)))==NULL' is not redundant abe-1.1.orig/src/Monster.c:669:5: note: Null pointer dereference abe-1.1.orig/src/Monster.c:539:9: style: Variable 'y' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Splash.c:93:8: style: Variable 'line' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Util.c:71:32: style:inconclusive: Function 'compress' argument 2 names different: declaration 'nmemb' definition 'size'. [funcArgNamesDifferent] abe-1.1.orig/src/Util.h:33:36: note: Function 'compress' argument 2 names different: declaration 'nmemb' definition 'size'. abe-1.1.orig/src/Util.c:71:32: note: Function 'compress' argument 2 names different: declaration 'nmemb' definition 'size'. abe-1.1.orig/src/Util.c:139:34: style:inconclusive: Function 'decompress' argument 2 names different: declaration 'nmemb' definition 'size'. [funcArgNamesDifferent] abe-1.1.orig/src/Util.h:34:38: note: Function 'decompress' argument 2 names different: declaration 'nmemb' definition 'size'. abe-1.1.orig/src/Util.c:139:34: note: Function 'decompress' argument 2 names different: declaration 'nmemb' definition 'size'. abe-1.1.orig/src/Util.c:71:19: style: Parameter 'buff' can be declared as pointer to const [constParameter] abe-1.1.orig/src/Util.c:143:26: style: Variable 'r' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Util.c:143:44: style: Variable 'n' is assigned a value that is never used. [unreadVariable] abe-1.1.orig/src/Map.c:1121:13: error: Using argument pos that points at uninitialized variable pos [ctuuninitvar] abe-1.1.orig/src/Map.c:1101:19: note: Calling function setImagePosition, 3rd argument is uninitialized abe-1.1.orig/src/Map.c:1121:13: note: Using argument pos diff: head abe-1.1.orig/src/Util.c:71:19: style: Parameter 'buff' can be declared as pointer to const [constParameter] 2.8 abe-1.1.orig/src/Util.c:71:19: style: Parameter 'buff' can be declared with const [constParameter] DONE