From 65cfded5013dfaffe65768afef25fa14b83a28bb Mon Sep 17 00:00:00 2001 From: murata Date: Wed, 8 Jun 2022 23:29:00 +0900 Subject: [PATCH] Rover: Initialize a string array --- Rover/AP_Arming.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rover/AP_Arming.cpp b/Rover/AP_Arming.cpp index e25e3ea7da..884051e191 100644 --- a/Rover/AP_Arming.cpp +++ b/Rover/AP_Arming.cpp @@ -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))) {