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

Fix clang compiler warnings #29238

Merged
merged 5 commits into from
Feb 11, 2025

Conversation

peterbarker
Copy link
Contributor

@peterbarker peterbarker commented Feb 6, 2025

Unused variables and wrong abs function used.

CI-tested only. And locally for compilation...

.... also now stops scripting using OwnPtr for i2c devices; this was tested on a ZeroOneX6 with an RM3100 and an example script which triggers a self-test on the device.

../../libraries/AP_Airspeed/AP_Airspeed_AUAV.h:68:11: warning: private field 'pressure_abs_L' is not used [-Wunused-private-field]
   68 |     float pressure_abs_L;
In file included from ../../libraries/AP_HAL_SITL/RCInput.cpp:6:
../../libraries/AP_HAL_SITL/RCInput.h:22:17: warning: private field '_sitlState' is not used [-Wunused-private-field]
   22 |     SITL_State *_sitlState;
      |                 ^
../../libraries/AP_HAL_SITL/RCInput.h:23:10: warning: private field 'using_rc_protocol' is not used [-Wunused-private-field]
   23 |     bool using_rc_protocol;
      |          ^
../../libraries/AP_RangeFinder/AP_RangeFinder_LightWareI2C.cpp:158:105: warning: argument 'reply' of type 'char[15]' with mismatched bound [-Warray-parameter]
  158 | void AP_RangeFinder_LightWareI2C::sf20_get_version(const char* send_msg, const char *reply_prefix, char reply[15])
      |                                                                                                         ^
../../libraries/AP_RangeFinder/AP_RangeFinder_LightWareI2C.h:47:80: note: previously declared as 'char[5]' here
   47 |     void sf20_get_version(const char* send_msg, const char *reply_prefix, char reply[5]);
      |                                                                                ^
@tridge
Copy link
Contributor

tridge commented Feb 11, 2025

ok to merge once testing scripting restart with i2c script

@peterbarker peterbarker merged commit 42c1ad3 into ArduPilot:master Feb 11, 2025
100 checks passed
@peterbarker
Copy link
Contributor Author

scripting restart worked just fine

@peterbarker peterbarker deleted the pr/calng-compiler-fixes branch February 11, 2025 01:46
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.

3 participants