diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-02-25 09:14:06 -0800 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-02-25 09:14:56 -0800 |
commit | 537c6ec1e623969caf44c77cd29d1c18c146c52d (patch) | |
tree | cd68a976802e081474e0b6087b2d1b74a49d62c6 /src | |
parent | a1f14005ab823adc1300754fd37c01e9842ed4bc (diff) | |
download | flatbuffers-537c6ec1e623969caf44c77cd29d1c18c146c52d.tar.gz flatbuffers-537c6ec1e623969caf44c77cd29d1c18c146c52d.tar.bz2 flatbuffers-537c6ec1e623969caf44c77cd29d1c18c146c52d.zip |
Added -Wextra-semi to Clang build.
Also fixed warnings this generated.
Change-Id: If3607907b2dd609f854b7b81225d9cf66af75a60
Diffstat (limited to 'src')
-rw-r--r-- | src/idl_gen_cpp.cpp | 2 | ||||
-rw-r--r-- | src/idl_gen_dart.cpp | 2 | ||||
-rw-r--r-- | src/idl_gen_grpc.cpp | 6 | ||||
-rw-r--r-- | src/idl_gen_js_ts.cpp | 20 | ||||
-rw-r--r-- | src/idl_gen_php.cpp | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/src/idl_gen_cpp.cpp b/src/idl_gen_cpp.cpp index 9294953e..a25dd6f9 100644 --- a/src/idl_gen_cpp.cpp +++ b/src/idl_gen_cpp.cpp @@ -2169,7 +2169,7 @@ class CppGenerator : public BaseGenerator { break; } } - }; + } std::string GenUnpackFieldStatement(const FieldDef &field, const FieldDef *union_field) { diff --git a/src/idl_gen_dart.cpp b/src/idl_gen_dart.cpp index 854649f3..fb7e0bdf 100644 --- a/src/idl_gen_dart.cpp +++ b/src/idl_gen_dart.cpp @@ -55,7 +55,7 @@ class DartGenerator : public BaseGenerator { DartGenerator(const Parser &parser, const std::string &path, const std::string &file_name) - : BaseGenerator(parser, path, file_name, "", "."){}; + : BaseGenerator(parser, path, file_name, "", ".") {} // Iterate through all definitions we haven't generate code for (enums, // structs, and tables) and output them to a single file. bool generate() { diff --git a/src/idl_gen_grpc.cpp b/src/idl_gen_grpc.cpp index 06ed765b..d682a553 100644 --- a/src/idl_gen_grpc.cpp +++ b/src/idl_gen_grpc.cpp @@ -113,12 +113,12 @@ class FlatBufService : public grpc_generator::Service { int method_count() const { return static_cast<int>(service_->calls.vec.size()); - }; + } std::unique_ptr<const grpc_generator::Method> method(int i) const { return std::unique_ptr<const grpc_generator::Method>( new FlatBufMethod(service_->calls.vec[i])); - }; + } private: const ServiceDef *service_; @@ -235,7 +235,7 @@ class FlatBufFile : public grpc_generator::File { int service_count() const { return static_cast<int>(parser_.services_.vec.size()); - }; + } std::unique_ptr<const grpc_generator::Service> service(int i) const { return std::unique_ptr<const grpc_generator::Service>( diff --git a/src/idl_gen_js_ts.cpp b/src/idl_gen_js_ts.cpp index a2e75fd7..ff248fc4 100644 --- a/src/idl_gen_js_ts.cpp +++ b/src/idl_gen_js_ts.cpp @@ -79,7 +79,7 @@ class JsTsGenerator : public BaseGenerator { JsTsGenerator(const Parser &parser, const std::string &path, const std::string &file_name) : BaseGenerator(parser, path, file_name, "", "."), - lang_(GetJsLangParams(parser_.opts.lang)){}; + lang_(GetJsLangParams(parser_.opts.lang)) {} // Iterate through all definitions we haven't generate code for (enums, // structs, and tables) and output them to a single file. bool generate() { @@ -127,8 +127,8 @@ class JsTsGenerator : public BaseGenerator { const auto &file = *it; const auto basename = flatbuffers::StripPath(flatbuffers::StripExtension(file)); - if (basename != file_name_) { - code += GenPrefixedImport(file, basename); + if (basename != file_name_) { + code += GenPrefixedImport(file, basename); } } } @@ -310,8 +310,8 @@ class JsTsGenerator : public BaseGenerator { } default: { result += " {" + type_name + "}"; } } - if (!arg_name.empty()) { - result += " " + arg_name; + if (!arg_name.empty()) { + result += " " + arg_name; } if (include_newline) { result += "\n"; @@ -1271,7 +1271,7 @@ class JsTsGenerator : public BaseGenerator { for (auto it = struct_def.fields.vec.begin(); it != struct_def.fields.vec.end(); ++it) { const auto &field = **it; - if (field.deprecated) + if (field.deprecated) continue; paramDoc += GenTypeAnnotation(kParam, GetArgType(field), GetArgName(field)); @@ -1292,7 +1292,7 @@ class JsTsGenerator : public BaseGenerator { for (auto it = struct_def.fields.vec.begin(); it != struct_def.fields.vec.end(); ++it) { const auto &field = **it; - if (field.deprecated) + if (field.deprecated) continue; if (lang_.language == IDLOptions::kTs) { @@ -1317,7 +1317,7 @@ class JsTsGenerator : public BaseGenerator { for (auto it = struct_def.fields.vec.begin(); it != struct_def.fields.vec.end(); ++it) { const auto &field = **it; - if (field.deprecated) + if (field.deprecated) continue; code += " " + methodPrefix + ".add" + MakeCamel(field.name) + "("; @@ -1332,8 +1332,8 @@ class JsTsGenerator : public BaseGenerator { } if (lang_.language == IDLOptions::kTs) { - if (!object_namespace.empty()) { - code += "}\n"; + if (!object_namespace.empty()) { + code += "}\n"; } code += "}\n"; } diff --git a/src/idl_gen_php.cpp b/src/idl_gen_php.cpp index 3d391c71..3c6747e3 100644 --- a/src/idl_gen_php.cpp +++ b/src/idl_gen_php.cpp @@ -31,7 +31,7 @@ class PhpGenerator : public BaseGenerator { public: PhpGenerator(const Parser &parser, const std::string &path, const std::string &file_name) - : BaseGenerator(parser, path, file_name, "\\", "\\"){}; + : BaseGenerator(parser, path, file_name, "\\", "\\") {} bool generate() { if (!GenerateEnums()) return false; if (!GenerateStructs()) return false; |