diff options
author | Jens Geyer <jensg@apache.org> | 2022-09-14 00:30:36 +0200 |
---|---|---|
committer | Jens Geyer <Jens-G@users.noreply.github.com> | 2022-09-14 08:48:34 +0200 |
commit | dfb6c6bca659934fe0b62002f814681470af2e37 (patch) | |
tree | 2e248bbc402eb4e011a49160468f15b2fa023e70 /compiler | |
parent | 9b09a1160a26472c98de70c5c3dcdd77347fe227 (diff) | |
download | thrift-dfb6c6bca659934fe0b62002f814681470af2e37.tar.gz |
Misc fixes about uninitialized vars etc that VC reported
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/cpp/src/thrift/generate/go_validator_generator.h | 2 | ||||
-rw-r--r-- | compiler/cpp/src/thrift/generate/validator_parser.h | 8 |
2 files changed, 5 insertions, 5 deletions
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<validation_value*> values; - validation_rule* inner; + validation_rule* inner = nullptr; }; class validation_parser { @@ -202,7 +202,7 @@ private: std::map<std::string, std::vector<std::string>>& 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 |