Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PVS-Studio scan report #433

Open
roginvs opened this issue Jan 4, 2025 · 0 comments
Open

PVS-Studio scan report #433

roginvs opened this issue Jan 4, 2025 · 0 comments

Comments

@roginvs
Copy link
Contributor

roginvs commented Jan 4, 2025

If you have nothing to do then you can take a look on this report. Some of the errors are actually errors, for example #432

  • src/actions.cc 478 err V547 Expression 'anim < 48 && anim > 63' is always false.
  • src/animation.cc 2773 warn V547 Expression 'savedTile != object->tile' is always false.
  • src/animation.cc 2846 warn V614 Potentially uninitialized variable 'x' used.
  • src/animation.cc 2846 warn V614 Potentially uninitialized variable 'y' used.
  • src/animation.cc 2375 warn V1051 Consider checking for misprints. It's possible that the 'sad->field_24' should be checked here.
  • src/animation.h 118 warn V1071 Consider inspecting the 'reg_anim_end' function. The return value is not always used. Total calls: 12, discarded results: 1.
  • src/art.cc 528 err V547 Expression is always false.
  • src/art.cc 636 err V781 The value of the 'type' variable is checked after it was used. Perhaps there is a mistake in program logic. Check lines: 636, 640.
  • src/art.cc 640 warn V560 A part of conditional expression is always false: type < OBJ_TYPE_ITEM.
  • src/art.h 161 warn V1071 Consider inspecting the 'lock' function. The return value is not always used. Total calls: 23, discarded results: 2.
  • src/audio.cc 81 err V595 The 'gAudioList' pointer was utilized before it was verified against nullptr. Check lines: 81, 87.
  • src/audio_file.cc 79 err V595 The 'gAudioFileList' pointer was utilized before it was verified against nullptr. Check lines: 79, 85.
  • src/character_editor.cc 998 err V557 Array underrun is possible. The 'gCharacterEditorIsCreationMode - 61' index is pointing beyond array bound.
  • src/character_editor.cc 1006 err V557 Array underrun is possible. The 'gCharacterEditorIsCreationMode - 82' index is pointing beyond array bound.
  • src/character_editor.cc 1021 err V557 Array underrun is possible. The 'gCharacterEditorIsCreationMode - 61' index is pointing beyond array bound.
  • src/character_editor.cc 1029 err V557 Array underrun is possible. The 'gCharacterEditorIsCreationMode - 82' index is pointing beyond array bound.
  • src/character_editor.cc 3493 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v33 > dbl_50170B' expression.
  • src/character_editor.cc 3496 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v33 > dbl_50170B' expression.
  • src/character_editor.cc 3531 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v33 > dbl_50170B' expression.
  • src/character_editor.cc 3729 err V674 The '19.2' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v11 <= 19.2' expression.
  • src/character_editor.cc 3733 err V674 The '19.2' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v11 > 19.2' expression.
  • src/character_editor.cc 3734 err V674 The '19.2' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v11 > 19.2' expression.
  • src/character_editor.cc 3775 err V674 The '19.2' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v11 >= 19.2' expression.
  • src/character_editor.cc 5199 err V674 The '19.2' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'repeatDelay <= dbl_5018F0' expression.
  • src/character_editor.cc 5203 err V674 The '19.2' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'repeatDelay > dbl_5018F0' expression.
  • src/character_editor.cc 5204 err V674 The '19.2' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'repeatDelay > dbl_5018F0' expression.
  • src/character_editor.cc 5273 err V674 The '19.2' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'repeatDelay >= dbl_5018F0' expression.
  • src/character_editor.cc 6109 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 <= dbl_5019BE' expression.
  • src/character_editor.cc 6113 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 > dbl_5019BE' expression.
  • src/character_editor.cc 6114 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 > dbl_5019BE' expression.
  • src/character_editor.cc 6133 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 < dbl_5019BE' expression.
  • src/character_editor.cc 6153 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 <= dbl_5019BE' expression.
  • src/character_editor.cc 6157 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 > dbl_5019BE' expression.
  • src/character_editor.cc 6158 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 > dbl_5019BE' expression.
  • src/character_editor.cc 6178 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 < dbl_5019BE' expression.
  • src/character_editor.cc 6192 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 <= dbl_5019BE' expression.
  • src/character_editor.cc 6196 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 > dbl_5019BE' expression.
  • src/character_editor.cc 6197 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 > dbl_5019BE' expression.
  • src/character_editor.cc 6212 err V674 The '14.4' constant of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'v19 < dbl_5019BE' expression.
  • src/character_editor.cc 7253 err V783 Dereferencing of the invalid iterator 'gCustomKarmaFolderDescriptions.end()' might take place.
  • src/character_editor.cc 2554 warn V778 Two similar code fragments were found. Perhaps, this is a typo and 'EDITOR_GRAPHIC_AGE_OFF' variable should be used instead of 'EDITOR_GRAPHIC_AGE_ON'.
  • src/character_editor.cc 1318 warn V779 Unreachable code detected. It is possible that an error is present.
  • src/character_editor.cc 7215 warn V1004 The 'pch' pointer was used unsafely after it was verified against nullptr. Check lines: 7205, 7215.
  • src/character_editor.cc 5195 warn V1044 Loop break conditions do not depend on the number of iterations.
  • src/character_editor.cc 857 warn V1048 The 'rc' variable was assigned the same value.
  • src/character_editor.cc 875 warn V1048 The 'rc' variable was assigned the same value.
  • src/character_editor.cc 893 warn V1048 The 'rc' variable was assigned the same value.
  • src/character_editor.cc 911 warn V1048 The 'rc' variable was assigned the same value.
  • src/character_selector.cc 947 warn V1004 The 'pch' pointer was used unsafely after it was verified against nullptr. Check lines: 932, 947.
  • src/color.cc 611 warn V522 There might be dereferencing of a potential null pointer 'entry'. Check lines: 611, 608.
  • src/combat.cc 5803 err V547 Expression 'aiming != 1' is always false.
  • src/combat.cc 4712 err V571 Recurring check. The 'if (defenderIsCritter)' condition was already verified in line 4711.
  • src/combat.cc 3521 warn V519 The '_main_ctd.defenderFlags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3520, 3521.
  • src/combat.cc 4711 warn V547 Expression 'defenderIsCritter' is always true.
  • src/combat.cc 4712 warn V547 Expression 'defenderIsCritter' is always true.
  • src/combat.cc 4726 warn V547 Expression 'defenderIsCritter' is always true.
  • src/combat.cc 4428 warn V560 A part of conditional expression is always true: defender != nullptr.
  • src/combat.cc 4475 warn V560 A part of conditional expression is always true: defender != nullptr.
  • src/combat.cc 6747 warn V560 A part of conditional expression is always true: dividend != divisor.
  • src/combat.cc 5019 warn V614 Potentially uninitialized variable 'baseMessageId' used.
  • src/combat.cc 3624 warn V1048 The 'attack->defenderHitLocation' variable was assigned the same value.
  • src/combat.cc 2272 warn V1051 Consider checking for misprints. It's possible that the 'damageType' should be checked here.
  • src/combat_ai.cc 3044 warn V557 Array overrun is possible. The value of 'run_away_mode' index could reach 6.
  • src/combat_ai.cc 2370 warn V560 A part of conditional expression is always true: currentDistance + actionPoints > 5.
  • src/combat_ai.cc 1925 warn V614 Potentially uninitialized variable 'distance' used.
  • src/combat_ai.cc 2655 warn V614 Potentially uninitialized variable 'intelligenceRequired' used.
  • src/combat_ai.cc 2657 warn V764 Possible incorrect order of arguments passed to '_determine_to_hit' function: 'hitMode' and 'hitLocation'.
  • src/config.h 23 warn V1071 Consider inspecting the 'configGetString' function. The return value is not always used. Total calls: 27, discarded results: 1.
  • src/critter.cc 769 warn V560 A part of conditional expression is always true: killType < KILL_TYPE_COUNT.
  • src/critter.cc 784 warn V560 A part of conditional expression is always true: killType < KILL_TYPE_COUNT.
  • src/critter.cc 769 warn V571 Recurring check. The 'killType < KILL_TYPE_COUNT' condition was already verified in line 768.
  • src/critter.cc 784 warn V571 Recurring check. The 'killType < KILL_TYPE_COUNT' condition was already verified in line 783.
  • src/critter.cc 431 warn V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 427, 431.
  • src/db.h 42 warn V1071 Consider inspecting the 'fileWriteInt32' function. The return value is not always used. Total calls: 25, discarded results: 2.
  • src/dbox.cc 847 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/dbox.cc 850 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/dbox.cc 888 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/dbox.cc 1279 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/dbox.cc 1282 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/dbox.cc 1337 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/dbox.cc 1108 warn V557 Array overrun is possible. The value of 'fileNameCopyLength + 1' index could reach 32.
  • src/dbox.cc 1200 warn V557 Array overrun is possible. The value of 'fileNameCopyLength + 1' index could reach 32.
  • src/dbox.cc 700 warn V1051 Consider checking for misprints. It's possible that the 'scrollDownButton' should be checked here.
  • src/dbox.cc 1065 warn V1051 Consider checking for misprints. It's possible that the 'scrollDownButton' should be checked here.
  • src/dfile.cc 256 err V595 The 'stream->decompressionStream' pointer was utilized before it was verified against nullptr. Check lines: 256, 261.
  • src/dfile.cc 194 err V597 The compiler could delete the 'memset' function call, which is used to flush 'dbase' object. The memset_s() function should be used to erase the private data.
  • src/dfile.cc 296 err V597 The compiler could delete the 'memset' function call, which is used to flush 'stream' object. The memset_s() function should be used to erase the private data.
  • src/dialog.cc 422 warn V519 The 'ptr->field_10' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 420, 422.
  • src/display_monitor.cc 299 warn V547 Expression 'space != nullptr' is always true.
  • src/elevator.cc 634 err V530 The return value of function 'toupper' is required to be utilized.
  • src/endgame.cc 948 warn V557 Array overrun is possible. The value of 'narratorFileNameLength - 1' index could reach 18446744073709551615.
  • src/endgame.cc 949 warn V557 Array overrun is possible. The value of 'narratorFileNameLength - 1' index could reach 18446744073709551615.
  • src/file_utils.cc 167 err V547 Expression 'bytesWritten < 0' is always false. Unsigned type value is never < 0.
  • src/font_manager.cc 377 err V567 The modification of the 'ptr' variable is unsequenced relative to another operation on the same variable. This may lead to undefined behavior.
  • src/game_dialog.cc 1180 err V547 Expression 'rc != - 1' is always true.
  • src/game_dialog.cc 1649 warn V519 The 'entry->optionMessageListId' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1646, 1649.
  • src/game_dialog.cc 1650 warn V519 The 'entry->optionMessageId' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1647, 1650.
  • src/game_dialog.cc 1176 warn V779 Unreachable code detected. It is possible that an error is present.
  • src/game_dialog.cc 2061 warn V1048 The 'v1' variable was assigned the same value.
  • src/game_sound.cc 432 err V547 Expression 'volume < (0) && volume > (0x7FFF)' is always false.
  • src/game_sound.cc 1304 warn V1048 The 'v3' variable was assigned the same value.
  • src/interface.cc 1057 warn V547 Expression 'leftItemState->item != nullptr' is always true.
  • src/interface.cc 1106 warn V547 Expression 'rightItemState->item != nullptr' is always true.
  • src/interface.cc 1057 warn V571 Recurring check. The 'leftItemState->item != nullptr' condition was already verified in line 1056.
  • src/interface.cc 1106 warn V571 Recurring check. The 'rightItemState->item != nullptr' condition was already verified in line 1105.
  • src/interpreter.cc 250 err V1082 Function marked as 'noreturn' may return control. This will result in undefined behavior.
  • src/interpreter.cc 564 warn V547 Expression 'len < 0' is always false.
  • src/interpreter.cc 612 warn V547 Expression 'v2 >= 0' is always true.
  • src/interpreter.cc 2466 warn V547 Expression 'parent != nullptr' is always false.
  • src/interpreter.cc 3088 warn V547 Expression 'size >= 0' is always true.
  • src/interpreter.cc 2805 warn V1004 The 'externalProgram' pointer was used unsafely after it was verified against nullptr. Check lines: 2793, 2805.
  • src/interpreter.h 231 warn V1071 Consider inspecting the 'programStackPopValue' function. The return value is not always used. Total calls: 42, discarded results: 4.
  • src/interpreter.h 232 warn V1071 Consider inspecting the 'programStackPopInteger' function. The return value is not always used. Total calls: 157, discarded results: 1.
  • src/interpreter_extra.cc 939 warn V547 Expression 'scriptType == SCRIPT_TYPE_SPATIAL' is always false.
  • src/interpreter_extra.cc 3159 warn V1048 The 'a5' variable was assigned the same value.
  • src/interpreter_extra.cc 3165 warn V1048 The 'color' variable was assigned the same value.
  • src/interpreter_lib.cc 1483 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1511 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1539 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1567 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1700 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1704 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1708 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1774 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1778 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 1782 err V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
  • src/interpreter_lib.cc 2294 err V595 The 'gIntLibProgramDeleteCallbacks' pointer was utilized before it was verified against nullptr. Check lines: 2294, 2300.
  • src/interpreter_lib.cc 713 warn V779 Unreachable code detected. It is possible that an error is present.
  • src/inventory.cc 1129 warn V547 Expression is always true.
  • src/inventory.cc 1957 warn V547 Expression 'quantity > 1' is always true.
  • src/inventory.cc 5668 warn V547 Expression 'value < max' is always true.
  • src/inventory.cc 5706 warn V547 Expression 'value > min' is always true.
  • src/inventory.cc 1873 warn V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 1854, 1873.
  • src/inventory.cc 1848 warn V614 Potentially uninitialized variable 'offset' used.
  • src/inventory.cc 4991 warn V614 Potentially uninitialized buffer 'formattedText' used. Consider checking the second actual argument of the 'fontDrawText' function.
  • src/item.cc 334 err V595 The 'inventory->items' pointer was utilized before it was verified against nullptr. Check lines: 334, 340.
  • src/item.cc 2382 warn V547 Expression 'critter != nullptr' is always true.
  • src/lips.cc 264 warn V512 A call of the 'strcpy' function will lead to overflow of the buffer 'gLipsData.field_50'.
  • src/loadsave.cc 625 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/loadsave.cc 628 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/loadsave.cc 675 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/loadsave.cc 1122 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/loadsave.cc 1125 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/loadsave.cc 1177 err V674 The '14.4' literal of the 'double' type is compared to a value of the 'int' type. Consider inspecting the 'scrollCounter > 14.4' expression.
  • src/loadsave.cc 2358 warn V557 Array overrun is possible. The value of 'textLength + 1' index could reach 256.
  • src/main.cc 707 err V595 The 'p' pointer was utilized before it was verified against nullptr. Check lines: 707, 712.
  • src/main.cc 118 warn V1044 Loop break conditions do not depend on the number of iterations.
  • src/map.cc 1124 warn V547 Expression 'hoursSinceLastVisit > 14 * 24' is always false.
  • src/map.cc 1152 warn V560 A part of conditional expression is always false: agingType == 2.
  • src/map.cc 489 warn V1004 The '(unsigned char *) vars' pointer was used unsafely after it was verified against nullptr. Check lines: 484, 489.
  • src/message.cc 114 warn V557 Array overrun is possible. The value of 'len - 1' index could reach 18446744073709551615.
  • src/message.cc 116 warn V557 Array overrun is possible. The value of 'len' index could reach 18446744073709551615.
  • src/mouse.cc 390 warn V719 The switch statement does not cover all values of the 'GestureType' enum: kUnrecognized.
  • src/mouse_manager.cc 559 err V522 Dereferencing of the null pointer 'sep' might take place.
  • src/mouse_manager.cc 596 err V571 Recurring check. This condition was already verified in line 595.
  • src/mouse_manager.cc 596 warn V547 Expression is always true.
  • src/mouse_manager.cc 600 warn V614 Potentially uninitialized variable 'imageHeight' used.
  • src/mouse_manager.cc 600 warn V614 Potentially uninitialized variable 'imageWidth' used.
  • src/mouse_manager.cc 238 warn V1051 Consider checking for misprints. It's possible that an assigned variable should be checked here.
  • src/movie_lib.cc 1939 err V570 The 'v11' variable is assigned to itself.
  • src/object.cc 493 err V595 The 'gObjectFids' pointer was utilized before it was verified against nullptr. Check lines: 493, 494.
  • src/object.cc 1114 err V595 The 'node' pointer was utilized before it was verified against nullptr. Check lines: 1114, 1122.
  • src/object.cc 2938 err V753 The '&=' operation always sets a value of 'flags' variable to zero.
  • src/object.cc 1339 warn V547 Expression 'a1 != nullptr' is always true.
  • src/object.cc 3869 warn V547 Expression 'v11' is always false.
  • src/object.cc 3656 warn V1048 The 'gDude->rotation' variable was assigned the same value.
  • src/object.cc 57 warn V1071 Consider inspecting the '_obj_adjust_light' function. The return value is not always used. Total calls: 10, discarded results: 1.
  • src/party_member.cc 290 err V595 The '_partyMemberLevelUpInfoList' pointer was utilized before it was verified against nullptr. Check lines: 290, 310.
  • src/party_member.cc 1311 warn V557 Array overrun is possible. The value of 'disposition + 1' index could reach 6.
  • src/party_member.cc 1357 warn V557 Array overrun is possible. The value of 'runAwayMode + 1' index could reach 7.
  • src/pipboy.cc 955 warn V1020 The function exited without calling the 'pipboyWindowDestroyButtons' function. Check lines: 955, 947.
  • src/pipboy.cc 1011 warn V1020 The function exited without calling the 'pipboyWindowDestroyButtons' function. Check lines: 1011, 947.
  • src/pipboy.cc 1041 warn V1020 The function exited without calling the 'pipboyWindowDestroyButtons' function. Check lines: 1041, 947.
  • src/pipboy.cc 1045 warn V1020 The function exited without calling the 'pipboyWindowDestroyButtons' function. Check lines: 1045, 947.
  • src/pipboy.cc 1072 warn V1020 The function exited without calling the 'pipboyWindowDestroyButtons' function. Check lines: 1072, 947.
  • src/pipboy.cc 1079 warn V1020 The function exited without calling the 'pipboyWindowDestroyButtons' function. Check lines: 1079, 947.
  • src/pipboy.cc 1195 warn V1020 The function exited without calling the 'pipboyWindowDestroyButtons' function. Check lines: 1195, 947.
  • src/proto.cc 1544 err V547 Expression 'ch != '\n'' is always true.
  • src/proto.cc 1995 err V595 The 'protoListExtent' pointer was utilized before it was verified against nullptr. Check lines: 1995, 1996.
  • src/proto.cc 618 warn V1037 Two or more case-branches perform the same actions. Check lines: 618, 626
  • src/proto.cc 706 warn V1037 Two or more case-branches perform the same actions. Check lines: 706, 710
  • src/proto.cc 983 warn V1037 Two or more case-branches perform the same actions. Check lines: 983, 987
  • src/proto.cc 1996 warn V1051 Consider checking for misprints. It's possible that the 'newExtent' should be checked here.
  • src/proto.h 139 warn V1071 Consider inspecting the 'protoGetProto' function. The return value is not always used. Total calls: 19, discarded results: 2.
  • src/proto_instance.cc 1542 warn V524 It is odd that the body of 'useLadderUp' function is fully equivalent to the body of 'useLadderDown' function.
  • src/proto_instance.cc 1199 warn V547 Expression 'a2 != gDude' is always true.
  • src/proto_instance.cc 1049 warn V560 A part of conditional expression is always false: rc == 0.
  • src/proto_instance.cc 1144 warn V560 A part of conditional expression is always true: rc == 2.
  • src/proto_instance.cc 94 warn V614 Potentially uninitialized variable 'sid' used.
  • src/proto_instance.cc 960 warn V614 Potentially uninitialized variable 'energyDensity' used.
  • src/queue.cc 418 warn V1048 The 'curr' variable was assigned the same value.
  • src/scripts.cc 1276 err V530 The return value of function 'clock' is required to be utilized.
  • src/scripts.cc 375 warn V547 Expression 'v1' is always false.
  • src/scripts.cc 2953 warn V547 Expression 'scriptIds != nullptr' is always true.
  • src/scripts.cc 2239 warn V560 A part of conditional expression is always true: script->localVarsOffset != - 1.
  • src/sfall_arrays.cc 216 warn V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument. Check lines: 216, 215.
  • src/skill.cc 531 warn V560 A part of conditional expression is always true: successCount > 0.
  • src/skill.cc 469 warn V1051 Consider checking for misprints. It's possible that the 'skillValue' should be checked here.
  • src/sound_decoder.cc 880 warn V614 Potentially uninitialized variable 'v20' used.
  • src/sound_decoder.cc 880 warn V614 Potentially uninitialized variable 'v22' used.
  • src/sound_decoder.cc 1236 warn V769 The '_AudioDecoder_scale_tbl' pointer in the '_AudioDecoder_scale_tbl + 0x10000' expression could be nullptr. In such case, resulting value will be senseless and it should not be used. Check lines: 1236, 1235.
  • src/stat.cc 468 warn V560 A part of conditional expression is always true: stat >= STAT_STRENGTH.
  • src/stat.cc 524 warn V560 A part of conditional expression is always true: stat >= STAT_STRENGTH.
  • src/tile.cc 1041 err V779 Unreachable code detected. It is possible that an error is present.
  • src/tile.cc 1165 warn V519 The '* screenY' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1164, 1165.
  • src/tile.cc 1261 warn V778 Two similar code fragments were found. Perhaps, this is a typo and 'minY' variable should be used instead of 'minX'.
  • src/tile.cc 1473 warn V778 Two similar code fragments were found. Perhaps, this is a typo and 'minY' variable should be used instead of 'minX'.
  • src/tile.cc 382 warn V1048 The 'v13' variable was assigned the same value.
  • src/tile_hires_stencil.cc 247 err V781 The value of the 'tileInfo.tile' variable is checked after it was used. Perhaps there is a mistake in program logic. Check lines: 247, 252.
  • src/tile_hires_stencil.cc 326 warn V751 Parameter 'windowHeight' is not used inside function body.
  • src/vcr.cc 218 warn V1051 Consider checking for misprints. It's possible that the '_vcr_time' should be checked here.
  • src/window.cc 2086 err V568 It's odd that the argument of sizeof() operator is the '& (managedWindow->regions)' expression.
  • src/window.cc 2099 err V568 It's odd that the argument of sizeof() operator is the '& (managedWindow->regions)' expression.
  • src/window.cc 411 err V595 The 'gWindowInputHandlers' pointer was utilized before it was verified against nullptr. Check lines: 411, 417.
  • src/window.cc 2658 err V1065 Expression can be simplified, check 'destWidth' and similar operands.
  • src/window.cc 2671 err V1065 Expression can be simplified, check 'destHeight' and similar operands.
  • src/window.cc 2678 err V1065 Expression can be simplified, check 'destWidth' and similar operands.
  • src/window.cc 2679 err V1065 Expression can be simplified, check 'destHeight' and similar operands.
  • src/window.cc 297 warn V547 Expression 'v1 != managedWindow->field_38' is always false.
  • src/window.cc 304 warn V547 Expression 'v1 != managedWindow->field_38' is always false.
  • src/window.cc 311 warn V547 Expression 'v1 != managedWindow->field_38' is always false.
  • src/window.cc 374 warn V547 Expression 'v1 != managedWindow->field_38' is always false.
  • src/window.cc 381 warn V547 Expression 'v1 != managedWindow->field_38' is always false.
  • src/window.cc 388 warn V547 Expression 'v1 != managedWindow->field_38' is always false.
  • src/window.cc 1514 warn V778 Two similar code fragments were found. Perhaps, this is a typo and 'field_50' variable should be used instead of 'normal'.
  • src/window.cc 1933 warn V1004 The 'managedButton->normal' pointer was used unsafely after it was verified against nullptr. Check lines: 1912, 1933.
  • src/window.cc 1981 warn V1004 The 'managedButton->pressed' pointer was used unsafely after it was verified against nullptr. Check lines: 1960, 1981.
  • src/window_manager.cc 884 err V501 There are identical sub-expressions to the left and to the right of the '-' operator: v20->rect.bottom - v20->rect.bottom
  • src/window_manager.cc 2098 err V595 The 'prevHoveredButton' pointer was utilized before it was verified against nullptr. Check lines: 2098, 2106.
  • src/window_manager.cc 37 warn V1071 Consider inspecting the 'buttonGetButton' function. The return value is not always used. Total calls: 17, discarded results: 1.
  • src/window_manager_private.cc 1790 warn V614 Potentially uninitialized variable 'y' used. Consider checking the second actual argument of the 'windowCreate' function.
  • src/window_manager_private.cc 1676 warn V1048 The '* value' variable was assigned the same value.
  • src/worldmap.cc 3435 err V781 The value of the 'areaIdx' variable is checked after it was used. Perhaps there is a mistake in program logic. Check lines: 3435, 3441.
  • src/worldmap.cc 2127 warn V557 Array overrun is possible. The value of 'condition->entriesLength - 1' index could reach 2.
  • src/worldmap.cc 2134 warn V557 Array overrun is possible. The value of 'condition->entriesLength - 1' index could reach 2.
  • src/worldmap.cc 4016 warn V1037 Two or more case-branches perform the same actions. Check lines: 4016, 4026
  • src/xfile.cc 63 err V597 The compiler could delete the 'memset' function call, which is used to flush 'stream' object. The memset_s() function should be used to erase the private data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant