From a3d781bf3fc98154e357a1435f2222834761b685 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 29 Dec 2015 21:00:12 +1100 Subject: [PATCH] GCS_MAVLink: fixed a valgrind error --- libraries/GCS_MAVLink/GCS_Common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 0cfade2121..b6c3c40c2a 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -1142,7 +1142,7 @@ void GCS_MAVLINK::send_statustext_all(MAV_SEVERITY severity, const char *fmt, .. if ((1U<= MAVLINK_NUM_NON_PAYLOAD_BYTES + MAVLINK_MSG_ID_STATUSTEXT_LEN) { - char msg2[50]; + char msg2[50] {}; va_list arg_list; va_start(arg_list, fmt); hal.util->vsnprintf((char *)msg2, sizeof(msg2), fmt, arg_list);