From dfb6c6bca659934fe0b62002f814681470af2e37 Mon Sep 17 00:00:00 2001 From: Jens Geyer Date: Wed, 14 Sep 2022 00:30:36 +0200 Subject: Misc fixes about uninitialized vars etc that VC reported --- compiler/cpp/src/thrift/generate/go_validator_generator.h | 2 +- compiler/cpp/src/thrift/generate/validator_parser.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler') diff --git a/compiler/cpp/src/thrift/generate/go_validator_generator.h b/compiler/cpp/src/thrift/generate/go_validator_generator.h index ca36347cb..27ce29b9b 100644 --- a/compiler/cpp/src/thrift/generate/go_validator_generator.h +++ b/compiler/cpp/src/thrift/generate/go_validator_generator.h @@ -59,7 +59,7 @@ private: void indent_down() { go_generator->indent_down(); } std::string indent() { return go_generator->indent(); } - std::string get_field_name(t_field* field); + //std::string get_field_name(t_field* field); -- no impl? std::string get_field_reference_name(t_field* field); std::string GenID(std::string id) { return id + std::to_string(tmp_[id]++); }; diff --git a/compiler/cpp/src/thrift/generate/validator_parser.h b/compiler/cpp/src/thrift/generate/validator_parser.h index 076af2ed6..5ae890007 100644 --- a/compiler/cpp/src/thrift/generate/validator_parser.h +++ b/compiler/cpp/src/thrift/generate/validator_parser.h @@ -110,8 +110,8 @@ private: bool bool_val = false; t_enum_value* enum_val = nullptr; std::string string_val; - validation_function* function_val; - t_field* field_reference_val; + validation_function* function_val = nullptr; + t_field* field_reference_val = nullptr; validation_value_type val_type; }; @@ -130,7 +130,7 @@ public: private: std::string name; std::vector values; - validation_rule* inner; + validation_rule* inner = nullptr; }; class validation_parser { @@ -202,7 +202,7 @@ private: std::map>& annotations); t_field* get_referenced_field(std::string annotation_value); validation_value::validation_function* get_validation_function(std::string annotation_value); - t_struct* reference; + t_struct* reference = nullptr; }; #endif -- cgit v1.2.1