Rover: Initialize a string array

This commit is contained in:
murata 2022-06-08 23:29:00 +09:00 committed by Andrew Tridgell
parent 501bd61820
commit 65cfded501
1 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ bool AP_Arming_Rover::disarm(const AP_Arming::Method method, bool do_disarm_chec
// check object avoidance has initialised correctly
bool AP_Arming_Rover::oa_check(bool report)
{
char failure_msg[50];
char failure_msg[50] = {};
if (rover.g2.oa.pre_arm_check(failure_msg, ARRAY_SIZE(failure_msg))) {
return true;
}
@ -205,7 +205,7 @@ bool AP_Arming_Rover::motor_checks(bool report)
bool ret = rover.g2.motors.pre_arm_check(report);
#if HAL_TORQEEDO_ENABLED
char failure_msg[50];
char failure_msg[50] = {};
AP_Torqeedo *torqeedo = AP_Torqeedo::get_singleton();
if (torqeedo != nullptr) {
if (!torqeedo->pre_arm_checks(failure_msg, ARRAY_SIZE(failure_msg))) {