Added -Wc++98-compat-extra-semi

And fixed 2 more extra semi-colons.

Change-Id: I1ee08e5b2f67cd0c886847c05cd4d63cfcafec3e
parent 537c6ec1
...@@ -29,7 +29,7 @@ option(FLATBUFFERS_PACKAGE_REDHAT ...@@ -29,7 +29,7 @@ option(FLATBUFFERS_PACKAGE_REDHAT
option(FLATBUFFERS_PACKAGE_DEBIAN option(FLATBUFFERS_PACKAGE_DEBIAN
"Build an deb using the 'package' target." "Build an deb using the 'package' target."
OFF) OFF)
if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS) if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS)
message(WARNING message(WARNING
"Cannot build tests without building the compiler. Tests will be disabled.") "Cannot build tests without building the compiler. Tests will be disabled.")
...@@ -193,7 +193,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") ...@@ -193,7 +193,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
"${CMAKE_CXX_FLAGS} -std=c++0x -Wall -pedantic -Werror -Wextra -Wno-unused-parameter") "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -pedantic -Werror -Wextra -Wno-unused-parameter")
set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast") set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast")
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8)
list(APPEND FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wimplicit-fallthrough" "-Wextra-semi" "-Werror=unused-private-field") # enable warning list(APPEND FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wimplicit-fallthrough" "-Wextra-semi" "-Wc++98-compat-extra-semi" "-Werror=unused-private-field") # enable warning
endif() endif()
if(FLATBUFFERS_LIBCXX_WITH_CLANG) if(FLATBUFFERS_LIBCXX_WITH_CLANG)
if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux") if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
......
...@@ -2468,10 +2468,10 @@ inline int LookupEnum(const char **names, const char *name) { ...@@ -2468,10 +2468,10 @@ inline int LookupEnum(const char **names, const char *name) {
// clang-format off // clang-format off
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \ #define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \
__pragma(pack(1)); \ __pragma(pack(1)) \
struct __declspec(align(alignment)) struct __declspec(align(alignment))
#define FLATBUFFERS_STRUCT_END(name, size) \ #define FLATBUFFERS_STRUCT_END(name, size) \
__pragma(pack()); \ __pragma(pack()) \
static_assert(sizeof(name) == size, "compiler breaks packing rules") static_assert(sizeof(name) == size, "compiler breaks packing rules")
#elif defined(__GNUC__) || defined(__clang__) #elif defined(__GNUC__) || defined(__clang__)
#define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \ #define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \
......
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