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
@@ -684,7 +684,8 @@ GPS::task_main()
switch (_mode) {
case GPS_DRIVER_MODE_NONE:
_mode = GPS_DRIVER_MODE_UBX;
/* FALLTHROUGH */
/* FALLTHROUGH */
case GPS_DRIVER_MODE_UBX:
_helper = new GPSDriverUBX(_interface, &GPS::callback, this, &_report_gps_pos, _p_report_sat_info);