From 84641b0b58ac3d925ea931b60faf4ba5ad7157c5 Mon Sep 17 00:00:00 2001 From: Gil Date: Fri, 13 Jul 2018 14:50:57 -0700 Subject: Suppress uninitialized read error under VS2017 (#1523) * Suppress uninitialized read error under VS2017. * Default-initialize Tag instead of requiring users to remember to do so. * Add constructors to match usage --- Firestore/core/src/firebase/firestore/nanopb/tag.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Firestore/core/src/firebase/firestore/nanopb/tag.h b/Firestore/core/src/firebase/firestore/nanopb/tag.h index 455ef0c..f9ad828 100644 --- a/Firestore/core/src/firebase/firestore/nanopb/tag.h +++ b/Firestore/core/src/firebase/firestore/nanopb/tag.h @@ -32,8 +32,14 @@ namespace nanopb { * google_firestore_v1beta1_Document_name_tag. */ struct Tag { - pb_wire_type_t wire_type; - uint32_t field_number; + Tag() { + } + + Tag(pb_wire_type_t w, uint32_t f) : wire_type{w}, field_number{f} { + } + + pb_wire_type_t wire_type = PB_WT_VARINT; + uint32_t field_number = 0u; }; } // namespace nanopb -- cgit v1.2.3