diff --git a/src/platforms/posix/drivers/accelsim/accelsim.cpp b/src/platforms/posix/drivers/accelsim/accelsim.cpp index 174c522383..cc299b5847 100644 --- a/src/platforms/posix/drivers/accelsim/accelsim.cpp +++ b/src/platforms/posix/drivers/accelsim/accelsim.cpp @@ -493,7 +493,7 @@ ACCELSIM::init() _accel_class_instance = register_class_devname(ACCEL_BASE_DEVICE_PATH); /* advertise sensor topic, measure manually to initialize valid report */ - struct accel_report arp; + struct accel_report arp = {}; _accel_reports->get(&arp); /* measurement will have generated a report, publish */ diff --git a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp index 5eb8ff7fea..850bf0f9d1 100644 --- a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp +++ b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp @@ -466,7 +466,7 @@ GYROSIM::init() measure(); /* advertise sensor topic, measure manually to initialize valid report */ - struct accel_report arp; + struct accel_report arp = {}; _accel_reports->get(&arp); /* measurement will have generated a report, publish */ @@ -482,7 +482,7 @@ GYROSIM::init() /* advertise sensor topic, measure manually to initialize valid report */ - struct gyro_report grp; + struct gyro_report grp = {}; _gyro_reports->get(&grp); _gyro->_gyro_topic = orb_advertise_multi(ORB_ID(sensor_gyro), &grp,