Made FlatBuffers compile correctly with -pedantic

Change-Id: I88b5993219e10e2dfb60ff98d6594d19871988fc
Tested: on Linux
This commit is contained in:
Wouter van Oortmerssen
2014-07-29 10:29:38 -07:00
parent 7057033116
commit 8f80fecc44
5 changed files with 19 additions and 10 deletions

View File

@@ -67,7 +67,10 @@ switch (type) {
FLATBUFFERS_GEN_TYPES_SCALAR(TD) \
FLATBUFFERS_GEN_TYPES_POINTER(TD)
// Create an enum for all the types above
// Create an enum for all the types above.
#ifdef __GNUC__
__extension__ // Stop GCC complaining about trailing comma with -Wpendantic.
#endif
enum BaseType {
#define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE) BASE_TYPE_ ## ENUM,
FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)