Switched VS build to -W4, and fixed all resulting warnings.

Change-Id: I654217cbd01a3a449503d95753e19b672ec7ec23
Tested: on Windows, Linux
This commit is contained in:
Wouter van Oortmerssen
2014-06-30 15:56:31 -07:00
parent a0b6ffc25b
commit 1256307a38
15 changed files with 83 additions and 33 deletions

View File

@@ -135,7 +135,7 @@ static void GenComment(const std::string &dc,
code += " - " + enum_def.name + "_" + enum_def.vals.vec.front()->name;
code += "]; }\n\n";
}
if (enum_def.is_union) {
// Generate a verifier function for this union that can be called by the
// table verifier functions. It uses a switch case to select a specific
@@ -274,6 +274,8 @@ static void GenTable(StructDef &struct_def, std::string *code_ptr) {
code += " " + struct_def.name;
code += "Builder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) ";
code += "{ start_ = fbb_.StartTable(); }\n";
code += " " + struct_def.name + "Builder &operator=(const ";
code += struct_def.name + "Builder &);\n";
code += " flatbuffers::Offset<" + struct_def.name;
code += "> Finish() { return flatbuffers::Offset<" + struct_def.name;
code += ">(fbb_.EndTable(start_, ";