Fix -Werror=format-truncation on GCC 7

Fix formatting

Check snprintf return for error AND overflow
This commit is contained in:
Julien Lecoeur
2017-06-26 15:50:44 +02:00
committed by Julian Oes
parent 407b403e68
commit 7929287f73
6 changed files with 64 additions and 34 deletions
+2 -1
View File
@@ -231,7 +231,8 @@ int InputMavlinkCmdMount::update_impl(unsigned int timeout_ms, ControlData **con
switch ((int)vehicle_command.param7) {
case vehicle_command_s::VEHICLE_MOUNT_MODE_RETRACT:
_control_data.gimbal_shutter_retract = true;
/* FALLTHROUGH */
/* FALLTHROUGH */
case vehicle_command_s::VEHICLE_MOUNT_MODE_NEUTRAL:
_control_data.type = ControlData::Type::Neutral;