-
Notifications
You must be signed in to change notification settings - Fork 183
Coverity Unused values Issues #5763
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
Open
JohnAFernandez
wants to merge
11
commits into
scp-fs2open:master
Choose a base branch
from
JohnAFernandez:Unused-values
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c9a46b3
Don't need to remove this flag
JohnAFernandez 9a4b05e
Remove this line
JohnAFernandez f18bf6e
This assignment is never used.
JohnAFernandez e558eff
Fix copy paste Bug
JohnAFernandez e531374
Move this declaration
JohnAFernandez a071238
Remove unused setting of storage_idx
JohnAFernandez b34d740
Actually acquire a subsystem
JohnAFernandez f462f74
Remove assignment
JohnAFernandez 61c811d
Remove Superfluous Variable
JohnAFernandez 2fca4e4
CI unused variable
JohnAFernandez 400a0ef
Merge branch 'scp-fs2open:master' into Unused-values
JohnAFernandez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -719,7 +719,7 @@ void hud_do_lock_indicator(float frametime) | |
| } | ||
| } | ||
|
|
||
| void hud_lock_acquire_current_target(object *target_objp, ship_subsys *target_subsys) | ||
| void hud_lock_acquire_current_target(object *target_objp, ship_subsys **target_subsys) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will now modify the source target subsys, which is obviously the intent of the function but didn't happen before now. Have the repercussions been checked? |
||
| { | ||
| ship *target_shipp=nullptr; | ||
| int lock_in_range=0; | ||
|
|
@@ -735,7 +735,7 @@ void hud_lock_acquire_current_target(object *target_objp, ship_subsys *target_su | |
| weapon_info* wip = &Weapon_info[swp->secondary_bank_weapons[swp->current_secondary_bank]]; | ||
|
|
||
| // Reset target subsys in case it isn't needed | ||
| if (target_subsys != nullptr) target_subsys = nullptr; | ||
| if (*target_subsys != nullptr) *target_subsys = nullptr; | ||
|
|
||
| // if a large ship, lock to pos closest to center and within range | ||
| if ( (target_shipp) && (Ship_info[target_shipp->ship_info_index].is_big_or_huge()) ) { | ||
|
|
@@ -764,7 +764,7 @@ void hud_lock_acquire_current_target(object *target_objp, ship_subsys *target_su | |
| lock_dot=vm_vec_dot(&Player_obj->orient.vec.fvec, &vec_to_lock); | ||
| if ( lock_dot > best_lock_dot ) { | ||
| best_lock_dot=lock_dot; | ||
| target_subsys = ss; | ||
| *target_subsys = ss; | ||
| } | ||
| } | ||
| ss = GET_NEXT( ss ); | ||
|
|
@@ -1073,7 +1073,7 @@ void hud_lock_determine_lock_target(lock_info *lock_slot, weapon_info *wip) | |
| } | ||
| } | ||
| } else { | ||
| hud_lock_acquire_current_target(lock_slot->obj, lock_slot->subsys); | ||
| hud_lock_acquire_current_target(lock_slot->obj, &lock_slot->subsys); | ||
| } | ||
| } | ||
| } else { | ||
|
|
@@ -1124,7 +1124,7 @@ void hud_lock_determine_lock_target(lock_info *lock_slot, weapon_info *wip) | |
| } | ||
| } | ||
| } else { | ||
| hud_lock_acquire_current_target(lock_slot->obj, lock_slot->subsys); | ||
| hud_lock_acquire_current_target(lock_slot->obj, &lock_slot->subsys); | ||
| } | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.