From c140c2b59c9f1e3eeacb9c4bcdd421572a0feca3 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 1 Dec 2015 13:58:28 +0100 Subject: [PATCH] Baro sim: Ensure struct is initialized to zero --- src/platforms/posix/drivers/barosim/baro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/posix/drivers/barosim/baro.cpp b/src/platforms/posix/drivers/barosim/baro.cpp index b538f399b1..fbcd28ae6e 100644 --- a/src/platforms/posix/drivers/barosim/baro.cpp +++ b/src/platforms/posix/drivers/barosim/baro.cpp @@ -662,7 +662,7 @@ BAROSIM::collect() perf_begin(_sample_perf); - struct baro_report report; + struct baro_report report = {}; /* this should be fairly close to the end of the conversion, so the best approximation of the time */ report.timestamp = hrt_absolute_time(); report.error_count = perf_event_count(_comms_errors);