AP_Param: cope with older gcc versions
Travis-CI uses 4.6.3
This commit is contained in:
parent
9ae0dd05f8
commit
fb5e53e1e4
@ -1089,6 +1089,8 @@ void AP_Param::show_all(AP_HAL::BetterStream *port)
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat"
|
||||
// convert one old vehicle parameter to new object parameter
|
||||
void AP_Param::convert_old_parameter(const struct ConversionInfo *info)
|
||||
{
|
||||
@ -1116,10 +1118,7 @@ void AP_Param::convert_old_parameter(const struct ConversionInfo *info)
|
||||
AP_Param *ap2;
|
||||
ap2 = find_P((const prog_char_t *)&info->new_name[0], &ptype);
|
||||
if (ap2 == NULL) {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat"
|
||||
hal.console->printf_P(PSTR("Unknown conversion '%S'\n"), info->new_name);
|
||||
#pragma GCC diagnostic pop
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1149,12 +1148,10 @@ void AP_Param::convert_old_parameter(const struct ConversionInfo *info)
|
||||
}
|
||||
} else {
|
||||
// can't do vector<->scalar conversion, or different vector types
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat"
|
||||
hal.console->printf_P(PSTR("Bad conversion type '%S'\n"), info->new_name);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
// convert old vehicle parameters to new object parametersv
|
||||
|
Loading…
Reference in New Issue
Block a user