From 447d8a56255a941086a585984859c6eca499f671 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 28 May 2020 23:05:09 +0200 Subject: [PATCH] Fix warning in GCC 10 --- src/tests/unit-tests/control-plane/protobuf_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/unit-tests/control-plane/protobuf_test.cc b/src/tests/unit-tests/control-plane/protobuf_test.cc index e376cdc3d..f47650086 100644 --- a/src/tests/unit-tests/control-plane/protobuf_test.cc +++ b/src/tests/unit-tests/control-plane/protobuf_test.cc @@ -81,7 +81,8 @@ TEST(Protobuf, Works) // We can access like this: std::vector vgs_read = serdes.readProtobuffer(obs); - Gnss_Synchro gs_read = vgs_read[0]; + Gnss_Synchro gs_read{}; + gs_read = vgs_read[0]; uint32_t prn_read = gs_read.PRN; uint32_t prn_read2 = vgs_read[1].PRN; std::string system_read(1, gs_read.System);