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

Plane: remove dead store of cruise_speed #29174

Merged

Conversation

peterbarker
Copy link
Contributor

The second assignment, "otherwise cruise" is redundant, so remove it.

../../ArduPlane/quadplane.cpp:4260:15: warning: Value stored to 'approach_speed' during its initialization is never read [deadcode.DeadStores]
        float approach_speed = cruise_speed;
              ^~~~~~~~~~~~~~   ~~~~~~~~~~~~
1 warning generated.

../../ArduPlane/quadplane.cpp:4260:15: warning: Value stored to 'approach_speed' during its initialization is never read [deadcode.DeadStores]
        float approach_speed = cruise_speed;
              ^~~~~~~~~~~~~~   ~~~~~~~~~~~~
1 warning generated.
Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a similar issue in rover that I noticed on my mac yesterday

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tridge tridge merged commit cdfe939 into ArduPilot:master Feb 4, 2025
70 checks passed
@peterbarker peterbarker deleted the pr/quadplane-cruise-speed-dead-store branch February 4, 2025 01:10
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

Successfully merging this pull request may close these issues.

None yet

5 participants