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

SITL: remove dead stores from rangefinder_range #29173

Merged

Conversation

peterbarker
Copy link
Contributor

roll and pitch are unused if !SITL_RANGEFINDER_AS_OBJECT_SENSOR

... so move roll/pitch declaration and manipulation into the #if block where they are used

../../libraries/SITL/SIM_Aircraft.cpp:546:13: warning: Value stored to 'roll' is never read [deadcode.DeadStores]
            roll = 0;
            ^      ~
../../libraries/SITL/SIM_Aircraft.cpp:551:13: warning: Value stored to 'roll' is never read [deadcode.DeadStores]
            roll = 0;
            ^      ~
../../libraries/SITL/SIM_Aircraft.cpp:557:13: warning: Value stored to 'pitch' is never read [deadcode.DeadStores]
            pitch = 0;
            ^       ~
../../libraries/SITL/SIM_Aircraft.cpp:562:13: warning: Value stored to 'pitch' is never read [deadcode.DeadStores]
            pitch = 0;

roll and pitch are unused if !SITL_RANGEFINDER_AS_OBJECT_SENSOR

../../libraries/SITL/SIM_Aircraft.cpp:546:13: warning: Value stored to 'roll' is never read [deadcode.DeadStores]
            roll = 0;
            ^      ~
../../libraries/SITL/SIM_Aircraft.cpp:551:13: warning: Value stored to 'roll' is never read [deadcode.DeadStores]
            roll = 0;
            ^      ~
../../libraries/SITL/SIM_Aircraft.cpp:557:13: warning: Value stored to 'pitch' is never read [deadcode.DeadStores]
            pitch = 0;
            ^       ~
../../libraries/SITL/SIM_Aircraft.cpp:562:13: warning: Value stored to 'pitch' is never read [deadcode.DeadStores]
            pitch = 0;
@peterbarker peterbarker merged commit a01b7e7 into ArduPilot:master Jan 29, 2025
100 checks passed
@peterbarker peterbarker deleted the pr/sim-aircraft-dead-stores branch January 29, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant