2024-04-22 12:59 ftp://ftp.de.debian.org/debian/pool/main/t/tennix/tennix_1.3.4.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=sdl --library=python --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j4 platform: Linux-6.1.0-20-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.56 compiler: g++ (Debian 12.2.0-14) 12.2.0 cppcheck: head 2.14.0 head-info: ea2e716 (2024-04-21 15:59:20 +0200) count: 107 107 elapsed-time: 0.6 0.6 head-timing-info: old-timing-info: head results: tennix-1.3.4/doc/data2csrc.c:17:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FILENAME_MAX [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/credits.h:32:16: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] tennix-1.3.4/src/archivetool.cc:134:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archivetool.cc:203:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archivetool.cc:214:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archive.cc:76:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archive.cc:103:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable endl [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archive.cc:116:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable endl [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archive.cc:147:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archive.cc:179:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archive.cc:212:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable endl [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/archive.h:91:21: style:inconclusive: Technically the member function 'TennixArchive::getItemFilename' can be const. [functionConst] tennix-1.3.4/src/archive.h:97:16: style:inconclusive: Technically the member function 'TennixArchive::getItemSize' can be const. [functionConst] tennix-1.3.4/src/archive.h:101:14: style:inconclusive: Technically the member function 'TennixArchive::endOfFile' can be const. [functionConst] tennix-1.3.4/src/archive.cc:72:9: warning: Class 'TennixArchive' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] tennix-1.3.4/src/archive.cc:72:9: warning: Class 'TennixArchive' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] tennix-1.3.4/src/archive.h:80:9: style: Class 'TennixArchive' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] tennix-1.3.4/src/archive.cc:158:5: error: Common realloc mistake: 'items' nulled but not freed upon failure [memleakOnRealloc] tennix-1.3.4/src/archive.cc:159:5: error: Common realloc mistake: 'blobs' nulled but not freed upon failure [memleakOnRealloc] tennix-1.3.4/src/archive.cc:86:14: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/archive.cc:91:12: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/archive.cc:143:18: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/archive.cc:158:14: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/archive.cc:159:13: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/archive.cc:176:15: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/archive.cc:195:16: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/archive.cc:173:12: style: Local variable 'offset' shadows outer variable [shadowVariable] tennix-1.3.4/src/archive.h:75:16: note: Shadowed declaration tennix-1.3.4/src/archive.cc:173:12: note: Shadow variable tennix-1.3.4/src/archive.cc:101:52: style: Parameter 'header' can be declared as reference to const [constParameterReference] tennix-1.3.4/src/archive.cc:114:50: style: Parameter 'item' can be declared as reference to const [constParameterReference] tennix-1.3.4/src/archive.cc:210:46: style: Parameter 'archive' can be declared as reference to const [constParameterReference] tennix-1.3.4/src/archive.cc:44:20: style: Variable 'end' can be declared as pointer to const [constVariablePointer] tennix-1.3.4/src/archive.cc:153:33: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] tennix-1.3.4/src/archive.cc:171:32: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] tennix-1.3.4/src/archivetool.cc:170:13: portability: %ld in format string (no. 1) requires 'long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_sint] tennix-1.3.4/src/archivetool.cc:150:22: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/sound.cc:117:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AUDIO_S16SYS [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/sound.cc:167:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/sound.cc:190:62: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MIX_MAX_VOLUME [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/sound.cc:230:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:117:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:47:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_ENABLE [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:223:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:124:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_IGNORE [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:234:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:148:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:248:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:157:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:263:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable w [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:174:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:267:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable h [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:193:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:271:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable w [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:253:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:277:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:285:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:288:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:302:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:393:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_BLENDMODE_BLEND [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:440:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable x [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:482:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:535:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_BLENDMODE_BLEND [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:583:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:609:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:624:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/graphics.cc:634:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/sound.cc:121:15: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/sound.cc:248:14: style: The scope of the variable 'id' can be reduced. [variableScope] tennix-1.3.4/src/game.cc:338:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/tennix.cc:121:64: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] tennix-1.3.4/src/game.cc:439:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_SCANCODE_ESCAPE [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/game.cc:790:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/game.cc:890:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION [valueFlowBailoutIncompleteVar] tennix-1.3.4/src/input.cc:202:18: style: The scope of the variable 'keystate' can be reduced. [variableScope] tennix-1.3.4/src/input.cc:267:11: style: The scope of the variable 'mb' can be reduced. [variableScope] tennix-1.3.4/src/input.cc:43:32: style: Parameter 'tnxar' can be declared as reference to const [constParameterReference] tennix-1.3.4/src/input.cc:168:42: style: Parameter 'device' can be declared as pointer to const [constParameterPointer] tennix-1.3.4/src/input.cc:182:42: style: Parameter 'device' can be declared as pointer to const [constParameterPointer] tennix-1.3.4/src/input.cc:196:48: style: Parameter 'd' can be declared as pointer to const [constParameterPointer] tennix-1.3.4/src/graphics.cc:476:22: style:inconclusive: Boolean expression 'x>=640' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean] tennix-1.3.4/src/graphics.cc:476:71: style:inconclusive: Boolean expression '!h' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean] tennix-1.3.4/src/graphics.cc:538:36: style: Condition '!fading_now' is always true [knownConditionTrueFalse] tennix-1.3.4/src/graphics.cc:533:9: note: Assuming that condition 'fading_now' is not redundant tennix-1.3.4/src/graphics.cc:538:36: note: Condition '!fading_now' is always true tennix-1.3.4/src/graphics.cc:121:25: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:122:23: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:126:15: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:127:14: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:146:28: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:222:23: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:232:31: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:253:14: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:655:13: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:657:13: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/graphics.cc:113:23: style: The scope of the variable 'rw' can be reduced. [variableScope] tennix-1.3.4/src/graphics.cc:307:9: style: The scope of the variable 'dx' can be reduced. [variableScope] tennix-1.3.4/src/graphics.cc:307:29: style: The scope of the variable 'cy' can be reduced. [variableScope] tennix-1.3.4/src/graphics.cc:305:18: style: Variable 'bitmap' can be declared as pointer to const [constVariablePointer] tennix-1.3.4/src/graphics.cc:417:37: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] tennix-1.3.4/src/graphics.cc:526:34: style: Variable 'end_current' can be declared as pointer to const [constVariablePointer] tennix-1.3.4/src/graphics.cc:592:32: style: Parameter 'surface' can be declared as pointer to const [constParameterPointer] tennix-1.3.4/src/graphics.cc:307:12: style: Variable 'dx' is assigned a value that is never used. [unreadVariable] tennix-1.3.4/src/game.cc:61:10: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/game.cc:124:14: style: C-style pointer casting [cstyleCast] tennix-1.3.4/src/game.cc:143:12: style: The scope of the variable 'nt' can be reduced. [variableScope] tennix-1.3.4/src/game.cc:145:12: style: The scope of the variable 'diff' can be reduced. [variableScope] tennix-1.3.4/src/game.cc:393:9: style: The scope of the variable 'p' can be reduced. [variableScope] tennix-1.3.4/src/game.cc:443:9: style: The scope of the variable 'x' can be reduced. [variableScope] tennix-1.3.4/src/game.cc:443:12: style: The scope of the variable 'y' can be reduced. [variableScope] tennix-1.3.4/src/game.cc:447:9: style: The scope of the variable 't' can be reduced. [variableScope] diff: DONE