Commit 3c7b660d authored by Paulo Pinheiro's avatar Paulo Pinheiro Committed by Wouter van Oortmerssen

[flatc] Remove an always true condition for flexbuffers (#5604)

The condition was unnecessary and Detected by

PVS-Studio
V560 [CWE-571] A part of conditional expression is always true: !opts.use_flexbuffers. flatc.cpp 438
parent 964365ba
......@@ -435,8 +435,7 @@ int FlatCompiler::Compile(int argc, const char **argv) {
}
} else {
ParseFile(*parser.get(), filename, contents, include_directories);
if (!opts.use_flexbuffers && !is_schema &&
!parser->builder_.GetSize()) {
if (!is_schema && !parser->builder_.GetSize()) {
// If a file doesn't end in .fbs, it must be json/binary. Ensure we
// didn't just parse a schema with a different extension.
Error("input file is neither json nor a .fbs (schema) file: " +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment