diff options
author | tira-misu <gunter.burchardt@boschrexroth.de> | 2020-12-10 23:03:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 14:03:53 -0800 |
commit | 9fca5e4f42ffedef5fe58da616c1df405c2411f7 (patch) | |
tree | 98f28ad8c09993eb783cc64cf38c845b5c18e396 /src/idl_parser.cpp | |
parent | 92a806b4e80bfc8405b5fed9a4116541096a10bc (diff) | |
download | flatbuffers-9fca5e4f42ffedef5fe58da616c1df405c2411f7.tar.gz flatbuffers-9fca5e4f42ffedef5fe58da616c1df405c2411f7.tar.bz2 flatbuffers-9fca5e4f42ffedef5fe58da616c1df405c2411f7.zip |
Add flatc option to inhibit all warnings #6005 (#6301)
* Fix C/C++ Create<Type>Direct with sorted vectors
If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".
* Changes due to code review
* Improve code readability
* Add generate of JSON schema to string to lib
* option indent_step is supported
* Remove unused variables
* Fix break in test
* Fix style to be consistent with rest of the code
* Add option --no-warnings to inhibit all warnings
* Fix order of member initialization
* Add documentation for --no-warnings
Diffstat (limited to 'src/idl_parser.cpp')
-rw-r--r-- | src/idl_parser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index bb23dc11..a32c93c3 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -142,7 +142,10 @@ void Parser::Message(const std::string &msg) { error_ += ": " + msg; } -void Parser::Warning(const std::string &msg) { Message("warning: " + msg); } +void Parser::Warning(const std::string &msg) { + if (!opts.no_warnings) + Message("warning: " + msg); +} CheckedError Parser::Error(const std::string &msg) { Message("error: " + msg); |