From c1361495ec4e00332d7462736bc9752f999f8e95 Mon Sep 17 00:00:00 2001 From: Thomas Debrunner Date: Mon, 11 Dec 2023 18:20:26 +0100 Subject: [PATCH] Message: initialize all fields in constructor --- include/mav/Message.h | 5 ++++- include/mav/utils.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/mav/Message.h b/include/mav/Message.h index d458468..e2e1944 100644 --- a/include/mav/Message.h +++ b/include/mav/Message.h @@ -82,7 +82,10 @@ namespace mav { int _crc_offset = -1; explicit Message(const MessageDefinition &message_definition) : - _message_definition(&message_definition) { + _source_partner({}), + _backing_memory({}), + _message_definition(&message_definition), + _crc_offset(-1) { } Message(const MessageDefinition &message_definition, ConnectionPartner source_partner, int crc_offset, diff --git a/include/mav/utils.h b/include/mav/utils.h index f18a39e..ffd3d57 100644 --- a/include/mav/utils.h +++ b/include/mav/utils.h @@ -32,6 +32,7 @@ * ****************************************************************************/ +#include #include #include #include