Skip to content

Commit 9bf9b18

Browse files
committed
Added -Wc++98-compat-extra-semi
And fixed 2 more extra semi-colons. Change-Id: I1ee08e5b2f67cd0c886847c05cd4d63cfcafec3e
1 parent 537c6ec commit 9bf9b18

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ option(FLATBUFFERS_PACKAGE_REDHAT
2929
option(FLATBUFFERS_PACKAGE_DEBIAN
3030
"Build an deb using the 'package' target."
3131
OFF)
32-
32+
3333
if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS)
3434
message(WARNING
3535
"Cannot build tests without building the compiler. Tests will be disabled.")
@@ -193,7 +193,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
193193
"${CMAKE_CXX_FLAGS} -std=c++0x -Wall -pedantic -Werror -Wextra -Wno-unused-parameter")
194194
set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast")
195195
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8)
196-
list(APPEND FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wimplicit-fallthrough" "-Wextra-semi" "-Werror=unused-private-field") # enable warning
196+
list(APPEND FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wimplicit-fallthrough" "-Wextra-semi" "-Wc++98-compat-extra-semi" "-Werror=unused-private-field") # enable warning
197197
endif()
198198
if(FLATBUFFERS_LIBCXX_WITH_CLANG)
199199
if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")

include/flatbuffers/flatbuffers.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2468,10 +2468,10 @@ inline int LookupEnum(const char **names, const char *name) {
24682468
// clang-format off
24692469
#if defined(_MSC_VER)
24702470
#define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \
2471-
__pragma(pack(1)); \
2471+
__pragma(pack(1)) \
24722472
struct __declspec(align(alignment))
24732473
#define FLATBUFFERS_STRUCT_END(name, size) \
2474-
__pragma(pack()); \
2474+
__pragma(pack()) \
24752475
static_assert(sizeof(name) == size, "compiler breaks packing rules")
24762476
#elif defined(__GNUC__) || defined(__clang__)
24772477
#define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \

0 commit comments

Comments
 (0)