Skip to content

Commit

Permalink
mission: fix compiler maybe-uninitialized warning
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Aug 20, 2018
1 parent 7f496cb commit f7e0409
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/mission/mission_impl.cpp
Expand Up @@ -440,7 +440,10 @@ void MissionImpl::assemble_mavlink_messages()
_mission_data.mavlink_mission_item_messages.clear();

bool last_position_valid = false; // This flag is to protect us from using an invalid x/y.
MAV_FRAME last_frame;
// TODO: might want a better default here, this is just
// to prevent the compiler from saying it might not
// be initialized.
MAV_FRAME last_frame = MAV_FRAME_GLOBAL_RELATIVE_ALT_INT;
int32_t last_x;
int32_t last_y;
float last_z;
Expand Down

0 comments on commit f7e0409

Please sign in to comment.