mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-24 16:01:53 +08:00
fix(mc_raptor): build with clang (#29276)
Apple clang stops px4_sitl_raptor in mc_raptor on two warnings: -Wcast-align for the pointer rl_tools stores in front of its aligned allocations, and -Wunused-private-field for timestamp_last_manual_control_input, which is never used. Build the module with -Wno-cast-align, as mc_nn_control does, and remove the unused timestamp and its _set flag. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>
This commit is contained in:
1 parent
0262f30251
commit
4ee456bd90
2 files changed
+4
-2
No files matched your search
@@ -19,3 +19,5 @@ px4_add_module(
|
||||
|
||||
target_compile_features(modules__mc_raptor PRIVATE cxx_std_17)
|
||||
target_compile_options(modules__mc_raptor PRIVATE -Wno-unused-result)
|
||||
# clang reports the pointer stored in front of rl_tools' aligned allocations with -Wcast-align
|
||||
target_compile_options(modules__mc_raptor PRIVATE -Wno-cast-align)
|
||||
@@ -135,9 +135,9 @@ private:
|
||||
vehicle_status_s _vehicle_status{};
|
||||
trajectory_setpoint_s _trajectory_setpoint{};
|
||||
hrt_abstime timestamp_last_local_position, timestamp_last_angular_velocity, timestamp_last_attitude, timestamp_last_trajectory_setpoint,
|
||||
timestamp_last_manual_control_input, timestamp_last_vehicle_status;
|
||||
timestamp_last_vehicle_status;
|
||||
bool timestamp_last_local_position_set = false, timestamp_last_angular_velocity_set = false, timestamp_last_attitude_set = false,
|
||||
timestamp_last_trajectory_setpoint_set = false, timestamp_last_manual_control_input_set = false, timestamp_last_vehicle_status_set = false;
|
||||
timestamp_last_trajectory_setpoint_set = false, timestamp_last_vehicle_status_set = false;
|
||||
bool timeout_message_sent = false;
|
||||
bool previous_trajectory_setpoint_stale = false;
|
||||
bool previous_active = false;
|
||||
|
||||
Reference in new issue
Block a user